perm filename SIMULA.JLS[UP,DOC]4 blob sn#414031 filedate 1979-01-23 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00264 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00034 00002
C00038 00003	DECsystem-10 SIMULA Language Handbook, part II             Page 2
C00040 00004	DECsystem-10 SIMULA Language Handbook, part II             Page 3
C00043 00005	DECsystem-10 SIMULA Language Handbook, part II             Page 4
C00045 00006	DECsystem-10 SIMULA Language Handbook, part II             Page 5
C00048 00007	DECsystem-10 SIMULA Language Handbook, part II             Page 6
C00051 00008	DECsystem-10 SIMULA Language Handbook, part II             Page 7
C00052 00009	DECsystem-10 SIMULA Language Handbook, part II             Page 8
C00056 00010	DECsystem-10 SIMULA Language Handbook, part II             Page 9
C00058 00011	DECsystem-10 SIMULA Language Handbook, part II            Page 10
C00062 00012	DECsystem-10 SIMULA Language Handbook, part II            Page 11
C00066 00013	DECsystem-10 SIMULA Language Handbook, part II            Page 12
C00068 00014	DECsystem-10 SIMULA Language Handbook, part II            Page 13
C00070 00015	DECsystem-10 SIMULA Language Handbook, part II            Page 14
C00074 00016	DECsystem-10 SIMULA Language Handbook, part II            Page 15
C00077 00017	DECsystem-10 SIMULA Language Handbook, part II            Page 16
C00080 00018	DECsystem-10 SIMULA Language Handbook, part II            Page 17
C00084 00019	DECsystem-10 SIMULA Language Handbook, part II            Page 18
C00085 00020	DECsystem-10 SIMULA Language Handbook, part II            Page 19
C00089 00021	DECsystem-10 SIMULA Language Handbook, part II            Page 20
C00093 00022	DECsystem-10 SIMULA Language Handbook, part II            Page 21
C00095 00023	DECsystem-10 SIMULA Language Handbook, part II            Page 22
C00099 00024	DECsystem-10 SIMULA Language Handbook, part II            Page 23
C00103 00025	DECsystem-10 SIMULA Language Handbook, part II            Page 24
C00107 00026	DECsystem-10 SIMULA Language Handbook, part II            Page 25
C00110 00027	DECsystem-10 SIMULA Language Handbook, part II            Page 26
C00112 00028	DECsystem-10 SIMULA Language Handbook, part II            Page 27
C00117 00029	DECsystem-10 SIMULA Language Handbook, part II            Page 28
C00120 00030	DECsystem-10 SIMULA Language Handbook, part II            Page 29
C00124 00031	DECsystem-10 SIMULA Language Handbook, part II            Page 30
C00127 00032	DECsystem-10 SIMULA Language Handbook, part II            Page 31
C00128 00033	DECsystem-10 SIMULA Language Handbook, part II            Page 32
C00132 00034	DECsystem-10 SIMULA Language Handbook, part II            Page 33
C00133 00035	DECsystem-10 SIMULA Language Handbook, part II            Page 34
C00137 00036	DECsystem-10 SIMULA Language Handbook, part II            Page 35
C00141 00037	DECsystem-10 SIMULA Language Handbook, part II            Page 36
C00144 00038	DECsystem-10 SIMULA Language Handbook, part II            Page 37
C00148 00039	DECsystem-10 SIMULA Language Handbook, part II            Page 38
C00151 00040	DECsystem-10 SIMULA Language Handbook, part II            Page 39
C00155 00041	DECsystem-10 SIMULA Language Handbook, part II            Page 40
C00158 00042	DECsystem-10 SIMULA Language Handbook, part II            Page 41
C00162 00043	DECsystem-10 SIMULA Language Handbook, part II            Page 42
C00166 00044	DECsystem-10 SIMULA Language Handbook, part II            Page 43
C00169 00045	DECsystem-10 SIMULA Language Handbook, part II            Page 44
C00172 00046	DECsystem-10 SIMULA Language Handbook, part II            Page 45
C00176 00047	DECsystem-10 SIMULA Language Handbook, part II            Page 46
C00179 00048	DECsystem-10 SIMULA Language Handbook, part II            Page 47
C00180 00049	DECsystem-10 SIMULA Language Handbook, part II            Page 48
C00183 00050	DECsystem-10 SIMULA Language Handbook, part II            Page 49
C00186 00051	DECsystem-10 SIMULA Language Handbook, part II            Page 50
C00189 00052	DECsystem-10 SIMULA Language Handbook, part II            Page 51
C00193 00053	DECsystem-10 SIMULA Language Handbook, part II            Page 52
C00195 00054	DECsystem-10 SIMULA Language Handbook, part II            Page 53
C00199 00055	DECsystem-10 SIMULA Language Handbook, part II            Page 54
C00203 00056	DECsystem-10 SIMULA Language Handbook, part II            Page 55
C00204 00057	DECsystem-10 SIMULA Language Handbook, part II            Page 56
C00208 00058	DECsystem-10 SIMULA Language Handbook, part II            Page 57
C00209 00059	DECsystem-10 SIMULA Language Handbook, part II            Page 58
C00212 00060	DECsystem-10 SIMULA Language Handbook, part II            Page 59
C00215 00061	DECsystem-10 SIMULA Language Handbook, part II            Page 60
C00219 00062	DECsystem-10 SIMULA Language Handbook, part II            Page 61
C00222 00063	DECsystem-10 SIMULA Language Handbook, part II            Page 62
C00225 00064	DECsystem-10 SIMULA Language Handbook, part II            Page 63
C00227 00065	DECsystem-10 SIMULA Language Handbook, part II            Page 64
C00229 00066	DECsystem-10 SIMULA Language Handbook, part II            Page 65
C00233 00067	DECsystem-10 SIMULA Language Handbook, part II            Page 66
C00236 00068	DECsystem-10 SIMULA Language Handbook, part II            Page 67
C00239 00069	DECsystem-10 SIMULA Language Handbook, part II            Page 68
C00242 00070	DECsystem-10 SIMULA Language Handbook, part II            Page 69
C00246 00071	DECsystem-10 SIMULA Language Handbook, part II            Page 70
C00249 00072	DECsystem-10 SIMULA Language Handbook, part II            Page 71
C00253 00073	DECsystem-10 SIMULA Language Handbook, part II            Page 72
C00257 00074	DECsystem-10 SIMULA Language Handbook, part II            Page 73
C00261 00075	DECsystem-10 SIMULA Language Handbook, part II            Page 74
C00265 00076	DECsystem-10 SIMULA Language Handbook, part II            Page 75
C00268 00077	DECsystem-10 SIMULA Language Handbook, part II            Page 76
C00271 00078	DECsystem-10 SIMULA Language Handbook, part II            Page 77
C00275 00079	DECsystem-10 SIMULA Language Handbook, part II            Page 78
C00280 00080	DECsystem-10 SIMULA Language Handbook, part II            Page 79
C00284 00081	DECsystem-10 SIMULA Language Handbook, part II            Page 80
C00288 00082	DECsystem-10 SIMULA Language Handbook, part II            Page 81
C00290 00083	DECsystem-10 SIMULA Language Handbook, part II            Page 82
C00294 00084	DECsystem-10 SIMULA Language Handbook, part II            Page 83
C00299 00085	DECsystem-10 SIMULA Language Handbook, part II            Page 84
C00303 00086	DECsystem-10 SIMULA Language Handbook, part II            Page 85
C00307 00087	DECsystem-10 SIMULA Language Handbook, part II            Page 86
C00309 00088	DECsystem-10 SIMULA Language Handbook, part II            Page 87
C00311 00089	DECsystem-10 SIMULA Language Handbook, part II            Page 88
C00314 00090	DECsystem-10 SIMULA Language Handbook, part II            Page 89
C00318 00091	DECsystem-10 SIMULA Language Handbook, part II            Page 90
C00321 00092	DECsystem-10 SIMULA Language Handbook, part II            Page 91
C00324 00093	DECsystem-10 SIMULA Language Handbook, part II            Page 92
C00328 00094	DECsystem-10 SIMULA Language Handbook, part II            Page 93
C00332 00095	DECsystem-10 SIMULA Language Handbook, part II            Page 94
C00336 00096	DECsystem-10 SIMULA Language Handbook, part II            Page 95
C00340 00097	DECsystem-10 SIMULA Language Handbook, part II            Page 96
C00345 00098	DECsystem-10 SIMULA Language Handbook, part II            Page 97
C00349 00099	DECsystem-10 SIMULA Language Handbook, part II            Page 98
C00352 00100	DECsystem-10 SIMULA Language Handbook, part II            Page 99
C00355 00101	DECsystem-10 SIMULA Language Handbook, part II           Page 100
C00357 00102	DECsystem-10 SIMULA Language Handbook, part II           Page 101
C00360 00103	DECsystem-10 SIMULA Language Handbook, part II           Page 102
C00362 00104	DECsystem-10 SIMULA Language Handbook, part II           Page 103
C00364 00105	DECsystem-10 SIMULA Language Handbook, part II           Page 104
C00367 00106	DECsystem-10 SIMULA Language Handbook, part II           Page 105
C00370 00107	DECsystem-10 SIMULA Language Handbook, part II           Page 106
C00373 00108	DECsystem-10 SIMULA Language Handbook, part II           Page 107
C00376 00109	DECsystem-10 SIMULA Language Handbook, part II           Page 108
C00379 00110	DECsystem-10 SIMULA Language Handbook, part II           Page 109
C00381 00111	DECsystem-10 SIMULA Language Handbook, part II           Page 110
C00384 00112	DECsystem-10 SIMULA Language Handbook, part II           Page 111
C00386 00113	DECsystem-10 SIMULA Language Handbook, part II           Page 112
C00388 00114	DECsystem-10 SIMULA Language Handbook, part II           Page 113
C00390 00115	DECsystem-10 SIMULA Language Handbook, part II           Page 114
C00392 00116	DECsystem-10 SIMULA Language Handbook, part II           Page 115
C00394 00117	DECsystem-10 SIMULA Language Handbook, part II           Page 116
C00396 00118	DECsystem-10 SIMULA Language Handbook, part II           Page 117
C00398 00119	DECsystem-10 SIMULA Language Handbook, part II           Page 118
C00400 00120	DECsystem-10 SIMULA Language Handbook, part II           Page 119
C00403 00121	DECsystem-10 SIMULA Language Handbook, part II           Page 120
C00406 00122	DECsystem-10 SIMULA Language Handbook, part II           Page 121
C00409 00123	DECsystem-10 SIMULA Language Handbook, part II           Page 122
C00412 00124	DECsystem-10 SIMULA Language Handbook, part II           Page 123
C00414 00125	DECsystem-10 SIMULA Language Handbook, part II           Page 124
C00416 00126	DECsystem-10 SIMULA Language Handbook, part II           Page 125
C00418 00127	DECsystem-10 SIMULA Language Handbook, part II           Page 126
C00421 00128	DECsystem-10 SIMULA Language Handbook, part II           Page 127
C00424 00129	DECsystem-10 SIMULA Language Handbook, part II           Page 128
C00428 00130	DECsystem-10 SIMULA Language Handbook, part II           Page 129
C00431 00131	DECsystem-10 SIMULA Language Handbook, part II           Page 130
C00434 00132	DECsystem-10 SIMULA Language Handbook, part II           Page 131
C00436 00133	DECsystem-10 SIMULA Language Handbook, part II           Page 132
C00438 00134	DECsystem-10 SIMULA Language Handbook, part II           Page 133
C00441 00135	DECsystem-10 SIMULA Language Handbook, part II           Page 134
C00443 00136	DECsystem-10 SIMULA Language Handbook, part II           Page 135
C00446 00137	DECsystem-10 SIMULA Language Handbook, part II           Page 136
C00449 00138	DECsystem-10 SIMULA Language Handbook, part II           Page 137
C00451 00139	DECsystem-10 SIMULA Language Handbook, part II           Page 138
C00454 00140	DECsystem-10 SIMULA Language Handbook, part II           Page 139
C00457 00141	DECsystem-10 SIMULA Language Handbook, part II           Page 140
C00458 00142	DECsystem-10 SIMULA Language Handbook, part II           Page 141
C00461 00143	DECsystem-10 SIMULA Language Handbook, part II           Page 142
C00464 00144	DECsystem-10 SIMULA Language Handbook, part II           Page 143
C00467 00145	DECsystem-10 SIMULA Language Handbook, part II           Page 144
C00470 00146	DECsystem-10 SIMULA Language Handbook, part II           Page 145
C00473 00147	DECsystem-10 SIMULA Language Handbook, part II           Page 146
C00476 00148	DECsystem-10 SIMULA Language Handbook, part II           Page 147
C00479 00149	DECsystem-10 SIMULA Language Handbook, part II           Page 148
C00482 00150	DECsystem-10 SIMULA Language Handbook, part II           Page 149
C00485 00151	DECsystem-10 SIMULA Language Handbook, part II           Page 150
C00487 00152	DECsystem-10 SIMULA Language Handbook, part II           Page 151
C00490 00153	DECsystem-10 SIMULA Language Handbook, part II           Page 152
C00493 00154	DECsystem-10 SIMULA Language Handbook, part II           Page 153
C00496 00155	DECsystem-10 SIMULA Language Handbook, part II           Page 154
C00499 00156	DECsystem-10 SIMULA Language Handbook, part II           Page 155
C00501 00157	DECsystem-10 SIMULA Language Handbook, part II           Page 156
C00505 00158	DECsystem-10 SIMULA Language Handbook, part II           Page 157
C00509 00159	DECsystem-10 SIMULA Language Handbook, part II           Page 158
C00512 00160	DECsystem-10 SIMULA Language Handbook, part II           Page 159
C00515 00161	DECsystem-10 SIMULA Language Handbook, part II           Page 160
C00518 00162	DECsystem-10 SIMULA Language Handbook, part II           Page 161
C00520 00163	DECsystem-10 SIMULA Language Handbook, part II           Page 162
C00523 00164	DECsystem-10 SIMULA Language Handbook, part II           Page 163
C00526 00165	DECsystem-10 SIMULA Language Handbook, part II           Page 164
C00528 00166	DECsystem-10 SIMULA Language Handbook, part II           Page 165
C00531 00167	DECsystem-10 SIMULA Language Handbook, part II           Page 166
C00534 00168	DECsystem-10 SIMULA Language Handbook, part II           Page 167
C00537 00169	DECsystem-10 SIMULA Language Handbook, part II           Page 168
C00540 00170	DECsystem-10 SIMULA Language Handbook, part II           Page 169
C00543 00171	DECsystem-10 SIMULA Language Handbook, part II           Page 170
C00545 00172	DECsystem-10 SIMULA Language Handbook, part II           Page 171
C00549 00173	DECsystem-10 SIMULA Language Handbook, part II           Page 172
C00553 00174	DECsystem-10 SIMULA Language Handbook, part II           Page 173
C00555 00175	DECsystem-10 SIMULA Language Handbook, part II           Page 174
C00560 00176	DECsystem-10 SIMULA Language Handbook, part II           Page 175
C00563 00177	DECsystem-10 SIMULA Language Handbook, part II           Page 176
C00567 00178	DECsystem-10 SIMULA Language Handbook, part II           Page 177
C00570 00179	DECsystem-10 SIMULA Language Handbook, part II           Page 178
C00573 00180	DECsystem-10 SIMULA Language Handbook, part II           Page 179
C00576 00181	DECsystem-10 SIMULA Language Handbook, part II           Page 180
C00580 00182	DECsystem-10 SIMULA Language Handbook, part II           Page 181
C00583 00183	DECsystem-10 SIMULA Language Handbook, part II           Page 182
C00584 00184	DECsystem-10 SIMULA Language Handbook, part II           Page 183
C00586 00185	DECsystem-10 SIMULA Language Handbook, part II           Page 184
C00589 00186	DECsystem-10 SIMULA Language Handbook, part II           Page 185
C00592 00187	DECsystem-10 SIMULA Language Handbook, part II           Page 186
C00595 00188	DECsystem-10 SIMULA Language Handbook, part II           Page 187
C00598 00189	DECsystem-10 SIMULA Language Handbook, part II           Page 188
C00600 00190	DECsystem-10 SIMULA Language Handbook, part II           Page 189
C00603 00191	DECsystem-10 SIMULA Language Handbook, part II           Page 190
C00606 00192	DECsystem-10 SIMULA Language Handbook, part II           Page 191
C00609 00193	DECsystem-10 SIMULA Language Handbook, part II           Page 192
C00611 00194	DECsystem-10 SIMULA Language Handbook, part II           Page 193
C00614 00195	DECsystem-10 SIMULA Language Handbook, part II           Page 194
C00617 00196	DECsystem-10 SIMULA Language Handbook, part II           Page 195
C00620 00197	DECsystem-10 SIMULA Language Handbook, part II           Page 196
C00624 00198	DECsystem-10 SIMULA Language Handbook, part II                Page 197
C00627 00199	DECsystem-10 SIMULA Language Handbook, part II                Page 198
C00629 00200	DECsystem-10 SIMULA Language Handbook, part II                Page 199
C00631 00201	DECsystem-10 SIMULA Language Handbook, part II                Page 200
C00634 00202	DECsystem-10 SIMULA Language Handbook, part II                Page 201
C00638 00203	DECsystem-10 SIMULA Language Handbook, part II                Page 202
C00642 00204	DECsystem-10 SIMULA Language Handbook, part II                Page 203
C00645 00205	DECsystem-10 SIMULA Language Handbook, part II                Page 204
C00647 00206	DECsystem-10 SIMULA Language Handbook, part II                Page 205
C00650 00207	DECsystem-10 SIMULA Language Handbook, part II                Page 206
C00653 00208	DECsystem-10 SIMULA Language Handbook, part II                Page 207
C00655 00209	DECsystem-10 SIMULA Language Handbook, part II                Page 208
C00658 00210	DECsystem-10 SIMULA Language Handbook, part II                Page 209
C00662 00211	DECsystem-10 SIMULA Language Handbook, part II                Page 210
C00665 00212	DECsystem-10 SIMULA Language Handbook, part II                Page 211
C00667 00213	DECsystem-10 SIMULA Language Handbook, part II                Page 212
C00670 00214	DECsystem-10 SIMULA Language Handbook, part II                Page 213
C00671 00215	DECsystem-10 SIMULA Language Handbook, part II                Page 214
C00674 00216	DECsystem-10 SIMULA Language Handbook, part II                Page 215
C00676 00217	DECsystem-10 SIMULA Language Handbook, part II                Page 216
C00679 00218	DECsystem-10 SIMULA Language Handbook, part II                Page 217
C00681 00219	DECsystem-10 SIMULA Language Handbook, part II                Page 218
C00684 00220	DECsystem-10 SIMULA Language Handbook, part II                Page 219
C00686 00221	DECsystem-10 SIMULA Language Handbook, part II                Page 220
C00688 00222	DECsystem-10 SIMULA Language Handbook, part II                Page 221
C00690 00223	DECsystem-10 SIMULA Language Handbook, part II                Page 222
C00693 00224	DECsystem-10 SIMULA Language Handbook, part II           Page 223
C00697 00225	DECsystem-10 SIMULA Language Handbook, part II           Page 224
C00700 00226	DECsystem-10 SIMULA Language Handbook, part II           Page 225
C00702 00227	DECsystem-10 SIMULA Language Handbook, part II           Page 226
C00707 00228	DECsystem-10 SIMULA Language Handbook, part II           Page 227
C00712 00229	DECsystem-10 SIMULA Language Handbook, part II           Page 228
C00716 00230	DECsystem-10 SIMULA Language Handbook, part II           Page 229
C00720 00231	DECsystem-10 SIMULA Language Handbook, part II           Page 230
C00721 00232	DECsystem-10 SIMULA Language Handbook, part II           Page 231
C00724 00233	DECsystem-10 SIMULA Language Handbook, part II           Page 232
C00725 00234	DECsystem-10 SIMULA Language Handbook, part II           Page 233
C00728 00235	DECsystem-10 SIMULA Language Handbook, part II           Page 234
C00731 00236	DECsystem-10 SIMULA Language Handbook, part II           Page 235
C00734 00237	DECsystem-10 SIMULA Language Handbook, part II           Page 236
C00738 00238	DECsystem-10 SIMULA Language Handbook, part II           Page 237
C00742 00239	DECsystem-10 SIMULA Language Handbook, part II           Page 238
C00746 00240	DECsystem-10 SIMULA Language Handbook, part II           Page 239
C00749 00241	DECsystem-10 SIMULA Language Handbook, part II           Page 240
C00752 00242	DECsystem-10 SIMULA Language Handbook, part II           Page 241
C00755 00243	DECsystem-10 SIMULA Language Handbook, part II           Page 242
C00759 00244	DECsystem-10 SIMULA Language Handbook, part II           Page 243
C00763 00245	DECsystem-10 SIMULA Language Handbook, part II           Page 244
C00767 00246	DECsystem-10 SIMULA Language Handbook, part II           Page 245
C00770 00247	DECsystem-10 SIMULA Language Handbook, part II           Page 246
C00774 00248	DECsystem-10 SIMULA Language Handbook, part II           Page 247
C00775 00249	DECsystem-10 SIMULA Language Handbook, part II           Page 248
C00778 00250	     Array dimensions, number of, error message  114
C00782 00251	     Cdc simula program conversion to dec  234
C00786 00252	     Contents, table of  . . . . .  3
C00790 00253	     Devices for directfile  . . .  61
C00794 00254	     Execution time error messages  141
C00798 00255	     Fortran, external procedure .  171
C00802 00256	     Imax (decsystem-10 algol) . .  245
C00806 00257	     Line feed, object i/o . . . .  56
C00810 00258	     Macro-10 procedures called from simula  174
C00814 00259	     Outimage, for infile  . . . .  56
C00818 00260	     Process class, internal representation  98
C00822 00261	     Representation in hardware  .  82
C00826 00262	     Simddt, loading of  . . . . .  65
C00830 00263	     Store data base handling package  237
C00834 00264	     Transport of simula programs from cdc  234
C00837 ENDMK
C⊗;



Swedish National Defense Research Institute     FOA HE 1 Report
Department of Planning and Operations Research  C8399-M3(E5)
S-10450 Stockholm 80                            December 1974
                                                Revised edition:
                                                September 1975

DECsystem-10 SIMULA Language Handbook Part II
=============================================

     (Programmer's Guide)

BY   Stefan Arnborg, Olof Bjorner, Lars Enderin, Elisabeth
     Engstrom, Reidar Karlsson, Mats Ohlin, Jacob Palme, Ingrid
     Wennerstrom and Claes Wihlborg.


ABSTRACT:

     The DECsystem-10 SIMULA Language Handbook contains the
     information necessary for an applications programmer who
     intends to use SIMULA on a DECsystem-10 computer.

     Part I contains a description of the SIMULA programming
     language.  The contents of Part I are mostly
     machine-independent.  Part II contains special information
     for DECsystem-10.

     Part II will tell you:
   > How to run the compiler on a DECsystem-10,
   > What might differ between SIMULA on the DEC 10 and other
     computers,
   > How to write separately compiled classes in SIMULA and
     procedures in SIMULA, MACRO 10 or FORTRAN,
   > How to use the SIMULA Debugging System (SIMDDT),
   > How to produce efficient and portable programs,
   > How to interpret error messages,
   > About useful utility programs in SIMULA and/or for SIMULA
     users.

     This document reflects the software as of version 2 of the
     SIMULA-10 system.

     Last update 1975-08-12.


SEARCH KEY

     Computer, Programming, Programming Language, SIMULA,
     DECsystem-10, Digital Equipment, Algol 60, Fortran, Separate
     compilation, Part-compilation, Debugging, On-line debugging,
     DDT, Dynamic Debugging Technique, Compiler, Compiling
     techniques, Data structures, Diagnostic messages, Error
     messages, Program measurement, Prettyprint, Program library.
DECsystem-10 SIMULA Language Handbook, part II             Page 2


CONDITIONS OF RELEASE

     The information in this document is subject to change
     without notice.  The Swedish National Defense Research
     Institute assumes no responsibility for any errors that may
     appear in this manual (or in the SIMULA-10 system).

     The software described in this document is furnished to the
     user for use on a DIGITAL computer system and may be copied
     only for use on such systems, except as may otherwise be
     provided in writing by the Swedish National Defense Research
     Institute.

     Copyright 1974 by The Swedish National Defense Research
     Institute.  Copying is allowed.



DECsystem-10 SIMULA Language Handbook, part II             Page 3
CHAPTER 0 CONTENTS


0    CONTENTS
     ========



        1  INTRODUCTION

        2  DEC SYSTEM-10 SIMULA SYSTEM

        3  OPERATING PROCEDURES

           3.1 INTRODUCTION
           3.2 THE R COMMAND
           3.3 COMPIL-CLASS COMMANDS
           3.4 BATCH
           3.5 SWITCHES


         4  IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE

           4.1 SYSTEM PREFIXES
           4.2 VIRTUAL MATCHES
           4.3 EDITING AND DE-EDITING PROCEDURES
           4.4 MATHEMATICAL LIBRARY FUNCTIONS
           4.5 COLLATING SEQUENCE
           4.6 INITIALIZATION OF CHARACTER VARIABLES
           4.7 SUBSCRIPT CHECKING
           4.8 RANDOM DRAWING
           4.9 QUALIFICATION CHECKING
           4.10 SIMULATION PROCEDURE TIME


         5  LANGUAGE EXTENSIONS

         6  RESTRICTIONS

           6.1 CAPACITY RESTRICTIONS
           6.2 PARAMETER CORRESPONDENCE
           6.3 FOR STATEMENTS
           6.4 MISCELLANEOUS RESTRICTIONS
           6.5 RESTRICTIONS IN SIMULA WITH RESPECT TO ALGOL 60


        7  SEPARATE COMPILATION

           7.1 THE EXTERNAL DECLARATION
           7.2 THE EXTERNAL SWITCH
           7.3 RESTRICTIONS ON SEPARATE COMPILATION
           7.4 SIMDIR UTILITY PROGRAM
DECsystem-10 SIMULA Language Handbook, part II             Page 4
CHAPTER 0 CONTENTS


        8  OBJECT PROGRAM I/O

           8.1 INTRODUCTION
           8.2 HOW TO DEFINE A FILE
           8.3 RUN-TIME SWITCHES
           8.4 CLASS INFILE
           8.5 CLASS OUTFILE
           8.6 CLASS PRINTFILE
           8.7 CLASS DIRECTFILE
           8.8 CLASS BASICIO


        9  DEBUGGING SIMULA PROGRAMS WITH SIMDDT

           9.1 LOADING AND STARTING SIMDDT
           9.2 SIMDDT INPUT AND OUTPUT
           9.3 SIMDDT COMMANDS



       10  PROGRAMMING CONSIDERATIONS

           10.1 WRITING EFFICIENT PROGRAMS
           10.2 WRITING PORTABLE PROGRAMS
           10.3 MISCELLANEOUS ADVICE
DECsystem-10 SIMULA Language Handbook, part II             Page 5
CHAPTER 0 CONTENTS


        APPENDICES

        A  HARDWARE REPRESENTATION

           A.1 SIMULA COMPILER INPUT
           A.2 SIMULA PROGRAMS ON CARDS
           A.3 STANDARD LINE SEQUENCE NUMBERS
           A.4 BASIC SYMBOLS
           A.5 IDENTIFIERS
           A.6 CONSTANTS
           A.7 COMMENTS
           A.8 USE OF SPACES AND LINE EDITING CHARACTERS


        B  INTERNAL REPRESENTATION

           B.1 REPRESENTATION OF VARIABLES
           B.2 REPRESENTATION OF DYNAMIC ADDRESSES
           B.3 REPRESENTATION OF PARAMETERS
           B.4 DYNAMIC RECORDS


        C  COMPILER DIAGNOSTICS

           C.1 COMMAND AND SWITCH MESSAGES
           C.2 SOURCE CODE DIAGNOSTICS


         D  RUN-TIME AND DEBUG DIAGNOSTICS

           D.1 DIALOGUE MESSAGES
           D.2 RUN-TIME ERROR MESSAGES


        E  HOW TO WRITE AN EXTERNAL MACRO OR 
           FORTRAN PROCEDURE

           E.1 EXTERNAL FORTRAN PROCEDURES
           E.2 FORTRAN PROGRAMMING EXAMPLE
           E.3 EXTERNAL MACRO-10 PROCEDURES
           E.4 MACRO-10 CALLING STANDARD
           E.5 STANDARD MACROS
           E.6 MACRO-10 PROGRAMMING EXAMPLES


        F  RUN-TIME SYSTEM COMPONENTS

        G  RESERVED SIMULA WORDS

DECsystem-10 SIMULA Language Handbook, part II             Page 6
CHAPTER 0 CONTENTS


        H  SAMPLE JOB LISTINGS

           H.1 THE R COMMAND
           H.2 THE COMPILE COMMAND
           H.3 THE LOAD COMMAND
           H.4 THE EXECUTE COMMAND
           H.5 THE DEBUG COMMAND
           H.6 CONTROL CARDS IN BATCH
           H.7 EXAMPLE OF CTL FILE IN BATCH
           H.8 SOURCE CODE LISTING WITH ERRORS AND
               CROSS REFERENCE TABLE
           H.9 SIMDDT EXAMPLES


        I  ERROR REPORT

        J  PROGRAM MEASUREMENT SYSTEM

        K  TECO, SOS OR EDITS ON SIMULA PROGRAMS

           K.1 WHY LINE NUMBERED FILES?
           K.2 WHICH TEXT EDITOR SHOULD YOU USE?
           K.3 HOW TO GIVE A FILE A NEW LINE NUMBER WITH TECO
           K.4 EDITING A LINE NUMBERED FILE WITH TECO


        L  AUTOMATIC INDENTATION AND PRETTYPRINTING
           SIMULA PROGRAMS

        M  CONVERSION OF SIMULA PROGRAMS
           BETWEEN DEC, IBM AND CDC COMPUTERS

           M.1 CONVERSION FROM IBM 360/370 SIMULA
               TO DEC SYSTEM-10 SIMULA
           M.2 CONVERSION FROM DEC SYSTEM-10 SIMULA
               TO IBM 360/370 SIMULA
           M.3 CONVERSION FROM CDC SIMULA
               TO DEC SYSTEM-10 SIMULA


        N  THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY

        O  DUMP OF CODE GENERATED BY THE SIMULA COMPILER


        P  CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA

           P.1 WHY TRANSLATE FROM ALGOL TO SIMULA?
           P.2 WHY IS SIMULA NOT COMPATIBLE WITH ALGOL?
           P.3 TEXT STRING HANDLING
           P.4 INPUT/OUTPUT
DECsystem-10 SIMULA Language Handbook, part II             Page 7
CHAPTER 0 CONTENTS


           P.5 MISCELLANEOUS
DECsystem-10 SIMULA Language Handbook, part II             Page 8
Chapter 1 INTRODUCTION


1    INTRODUCTION
     ============


     SIMULA is a general purpose language which contains Algol 60
     as a subset.  Its defining documents are the Common Base
     Language [1] and the Revised Algol 60 Report [2].  In
     addition to the facilities offered by Algol, SIMULA is
     especially suited for list processing, text handling and
     simulation, through the class concept.  The SIMULA language
     is described in detail in the first part of the DECsystem-10
     SIMULA Language Handbook [3].

     The full SIMULA language, including recommended extensions,
     is implemented as defined in Common Base Language.  In
     addition a powerful interactive debugging system called
     SIMDDT is provided.  Special care has been taken to make
     this SIMULA implementation compatible with IBM 360/370
     SIMULA in as many respects as possible.  Conversion programs
     exist which transform IBM 360/370 programs to DECsystem-10
     SIMULA and vice versa (see appendix M).  Compatibility with
     other SIMULA systems is also high and a conversion program
     from CDC SIMULA to DECsystem-10 SIMULA is also available
     (see appendix M).

     This part of the SIMULA Language Handbook contains
     information on all implementation defined parts of the
     SIMULA language, such as object program I/O and various
     restrictions.  It also contains descriptions of features
     unique to the DECsystem-10 implementation, e.g.  commands
     and switches, SIMDDT debugging package and utility programs.

     The reader of this manual is supposed to be familiar with
     the SIMULA language and the time-sharing environment of
     DECsystem-10 [4].

     The development of the SIMULA system was undertaken as a
     joint project between the software house Engmans Elektronik
     AB (ENEA) and the Swedish National Defense Research
     Institute (FOA).  This document was compiled by Olof
     Bjorner, Elisabeth Engstrom, Reidar Karlsson, Ingrid
     Wennerstrom and Claes Wihlborg from ENEA and by Lars
     Enderin, Mats Ohlin, Jacob Palme and Stefan Arnborg from
     FOA.
DECsystem-10 SIMULA Language Handbook, part II             Page 9
Chapter 1 INTRODUCTION


     If you want a copy of the SIMULA system (not for the KA10
     CPU), you should get it either from the Swedish National
     Defence Research Institute or from the DECUS library.  In
     that way you will get the best and latest version.
     Therefore do not privately redistribute the SIMULA system to
     other installations.

     Copies of DECsystem-10 SIMULA for the KA10 CPU can be
     obtained from the Computing Center at the University of
     Western Ontario, London, Canada.
     Reference documents:


     1.  Dahl, Myhrhaug and Nygaard:
         Common Base Language
         Norwegian Computing Center, October 1970.
         Publication No S-22.

     2.  Revised Report on the Algorithmic Language Algol 60
         CACM Vol 6, No 1 1963.

     3.  DECsystem-10 SIMULA Language Handbook, part I
         FOA P Report No C8398-M3(E5), October 1974.

     4.  DECsystem-10 Users Handbook, 2nd Edition
         Digital Equipment Corporation, 1972

     5.  Birtwistle, Myhrhaug, Nygaard:
         SIMULA begin
         Studentlitteratur, Lund, Sweden 1973 
DECsystem-10 SIMULA Language Handbook, part II            Page 10
Chapter 2 THE DECsystem-10 SIMULA SYSTEM


2.   THE DECsystem-10 SIMULA SYSTEM
     ==============================


     The SIMULA system consists of the following subsystems:

     *  a three pass compiler
     *  a run-time system
     *  an interactive debug system
     *  utility programs and help files.

     The SIMULA system will run under DEC monitors series 5 and 6
     and can be used in the same way as other language
     processors, e.g FORTRAN or COBOL.  The operating procedures
     are described in chapter 3.

     The compiler takes as input a source module specified in the
     command string.  If there are references to external modules
     in the program the compiler also reads attribute files for
     these modules (for further information about external
     modules see chapter 7).  The source program is translated
     into an equivalent object program.  This object program
     together with control information to the run-time system and
     symbol tables are output to a REL file.  If compile-time
     errors or warning conditions were detected, diagnostic
     messages are output to the terminal.  If the compiled module
     was itself an external class or procedure definition, an
     attribute file with extension ATR is output as well.  The
     compiler also produces a program listing with an optional
     cross reference table if requested.

     The object program, i.e.  the REL file produced from the
     main program and all REL files for external modules referred
     to by it, are loaded into core by LINK-10.  LINK-10 also
     searches the SIMULA library SIMLIB and fetches subroutines
     referred to by the object programs.  The output from LINK-10
     is an executable SIMULA program in core which can be saved
     on disk with the SAVE command.

     Before the execution starts, the user may request the
     interactive debug package SIMDDT by issuing the command
     REENTER instead of START.  This loads the self-relocating
     debug system into core.  Otherwise the debug system is
     automatically loaded after execution start when needed.

DECsystem-10 SIMULA Language Handbook, part II            Page 11
Chapter 2 THE DECsystem-10 SIMULA SYSTEM


     When the SIMULA program starts, a reentrant high segment
     (usually called operating system, object-time system or
     run-time system(1)) containing additional support routines
     is fetched from the system area.  The execution of the
     SIMULA program then proceeds.  The high segment is called
     SIMRTS.  For reasons of storage economy, SIMRTS is usually
     split into two separate segments of which one is loaded
     initially and is replaced with the other once initialization
     is ready.  The initial high segment may be needed by some
     programs when creating and opening new files in the course
     of execution, but the other high segment is the one normally
     active.

     If an illegal condition is detected during execution, SIMDDT
     is loaded and an appropriate diagnostic message is printed
     on the user's TTY.  SIMDDT then waits for commands issued by
     the user to find out the cause of the error, but the
     execution cannot be continued.

     The debug package, SIMDDT, is similar in capacity to DDT but
     is entirely source language oriented.  The user may specify
     breakpoints and conditions to stop at defined statements.
     SIMDDT is described in chapter 9.

     Utility programs exist for conversion of SIMULA source
     programs between CDC SIMULA, IBM 360/370 SIMULA and
     DECsystem-10 SIMULA and for measuring program efficiency.
     These utility programs are described in appendix M.  A
     special program, SIMDIR, can be used to obtain information
     from the directory about the files compiled with the SIMULA
     compiler.  The SIMDIR program is described in chapter 7.

     The ability of TOPS-10 to share reentrant code in high
     segments has been utilized in the compiler and SIMRTS.  The
     compiler generates code in the low segment.  This code is
     also reentrant as long as no breakpoints are set.  Library
     routines in SIMLIB are also kept in low segment and are not
     reentrant.

     The compiler will run in a minimum of 23K words for very
     small programs and in 30K words for large programs.  The
     reentrant parts of RTS will occupy either 4.5K or 5.5K words
     of core.


-----------------

(1) The routines in SIMLIB and SIMRTS are called run-time  system
(RTS) throughout this manual.
DECsystem-10 SIMULA Language Handbook, part II            Page 12
Chapter 2 THE DECsystem-10 SIMULA SYSTEM


     The following help files exist:

     SIMULA.HLP
     contains information about the SIMULA system and references
     to other help files and documentation files.

     SIMCOM.HLP
     contains information about command string format and
     compile-time switches.  This file is also printed as a
     result of the compiler switch HELP.

     SIMRTS.HLP
     contains information about run-time switches and file
     definitions in a specification file.  This file is also
     printed as a result of the run-time switch HELP.

     SIMDDT.HLP
     contains information about available SIMDDT commands.  An
     abbreviated version of this file is printed on the user's
     TTY as a result of the SIMDDT command HELP.  
DECsystem-10 SIMULA Language Handbook, part II            Page 13
Chapter 3 OPERATING PROCEDURES


3.   OPERATING PROCEDURES
     ====================



3.1  INTRODUCTION

     The DECsystem-10 monitor supports both time-sharing and
     multiprogramming batch mode of operation.  The SIMULA
     programmer can use either or both of these operating
     environments to develop his applications.  In the
     time-sharing environment he can run the SIMULA compiler
     either directly using the R command or indirectly using the
     commands COMPILE, LOAD, DEBUG and EXECUTE.  In a batch
     environment he can also use a special batch card $SIMULA.


DECsystem-10 SIMULA Language Handbook, part II            Page 14
Chapter 3.2 OPERATING PROCEDURES, THE R COMMAND


     3.2  THE R COMMAND

     This command can be used if your installation has not yet
     implemented SIMULA into the COMPIL cusp, which interprets
     commands like COMPILE and EXECUTE.

     The compiler is invoked with the following command:

     R SIMULA

     The compiler outputs an asterisk (*) on the terminal and is
     now ready to accept the first command.  A command should
     have the following format:

     relfil,lstfil=source1,source2,...

     Syntax:

     1. Each file descriptor has the format:

     dev:filename.ext[ppn]/switch/switch...

     Default for device (dev) is DSK.  Default for ppn is the
     user's project-programmer number.

     2. relfil receives the object code generated by the compiler
     and is always created unless severe errors were detected
     during compilation.  Default filename is the name of the
     first source.  Default extension (ext) is REL.

     3. lstfil receives the program listing generated by the
     compiler and is produced if one of the switches L or C is
     set (see below).  Default filename is the name of the last
     source file.  Default extension (ext) is LST.

     4. source1, source2, ...  are the source files which,
     combined, make up one SIMULA source program.  Default
     extension is SIM.  Device must be disk or a logical name
     assigned to a disk device with the monitor command ASSIGN.

     5. Left arrow (←) may be used instead of equal sign (=).

     6. If only one source file is used as input and default
     names of rel and lst files are desired the equal sign or
     left arrow may be omitted.

     7.  A number of switches may follow any of the file
     descriptors.  A switch applies from the beginning of the
     preceding source file until the switch is changed.  Note
     however that certain switches must appear before the start
     of the program, i.e.  must follow the first source
DECsystem-10 SIMULA Language Handbook, part II            Page 15
Chapter 3.2 OPERATING PROCEDURES, THE R COMMAND


     specification.  Switches following relfil or lstfil apply to
     the first source.  The switches are described in section
     3.5.

     8.  Leading and trailing spaces or tabs are ignored in a
     file descriptor.  The following characters delimit a file
     descriptor:
     carriage return (<CR>)
     comma (,)
     equal sign (=)
     left arrow (←)
     All other delimiting characters will be treated as illegal
     and cause an error message to appear on the terminal.

     9.  Legal characters in a device name, file name or
     extension are letters (lower case are converted to upper
     case), digits (0-9), dollar ($) and percent (%).

     10.  A project or programmer number must not exceed 6 digits
     and must contain only octal digits.  A ppn must be delimited
     by square brackets.  Sub-file directories are not allowed
     here.

     When the program is compiled without errors the following
     text is printed on the terminal:

     NO ERRORS DETECTED

     If errors were detected during the compilation the typed
     text consists of the diagnostic messages together with the
     relevant source lines and the message:

     ERRORS DETECTED:

        ww TYPE W
        ee TYPE E

     where ww is number of warnings and ee is number of errors.

     Then a new asterisk is output and a new command may be
     entered.  The compilation is terminated with control-C.

DECsystem-10 SIMULA Language Handbook, part II            Page 16
Chapter 3.3 OPERATING PROCEDURES, COMPIL-CLASS COMMANDS


3.3  COMPIL-CLASS COMMANDS


     Any of the commands COMPILE, LOAD, EXECUTE and DEBUG may be
     used with all the standard features of the COMPIL CUSP such
     as concatenation with +, processor switches in parentheses
     etc.  The switch SIMULA and the extension SIM are recognized
     by the COMPIL class commands.  The file will be compiled
     with the SIMULA compiler if the source file extension is SIM
     or if the SIMULA switch is used in the command and the
     source file extension is not found or not recognized as
     belonging to another language processor.  The COMPIL switch
     CREF will give a listfile with extension LST and the LIST
     switch will give a spooled LPT file.
     If an external class or procedure is missing in a LOAD
     command the LINK-10 program will give the message:
     ?LNKUGS undefined global symbols
        name   location
     where the second character in the name is %.
     This name is unique and created by the SIMULA compiler to
     force an automatic check at load time that the external
     module has not been changed since the main program was
     compiled.  You can use the SIMDIR program to find out the
     names of all the external classes and procedures that are
     required by the main program.

     Examples:

      .COMPILE SIMPRO(-WR),SIMPR5/LIST
      SIMULA:  SIMPRO
      SIMULA:  SIMPR5

      EXIT

     The line NO ERRORS DETECTED is suppressed.

      .LOAD SIMPR1+SIMPR2
      SIMULA:  SIMPR1
      LINK:  Loading

      EXIT

      .EXECUTE SIMPRO
      SIMULA:  SIMPRO
      LINK:  Loading
      [LNKXCT SIMPRO Execution]

      .DEBUG SIMPRO
      SIMULA:  SIMPRO
      Link:  Loading
      [LNKXCT SIMPRO Execution]
DECsystem-10 SIMULA Language Handbook, part II            Page 17
Chapter 3.3 OPERATING PROCEDURES, COMPIL-CLASS COMMANDS


      SIMDDT STARTED
      *

     Chapter 9 describes how to use SIMDDT.  More elaborate
     examples are found in Appendix H.

     INSTALLATIONS WITHOUT SIMULA MODIFICATIONS TO COMPIL AND
     LINK

     If your installation has not implemented the special SIMULA
     modifications to the COMPIL and LINK cusps, then SIMULA
     source programs must be compiled using the "R SIMULA"
     command (chapter 3.2).  They may then be loaded by the
     following command:

     .LOAD/REL xxxx,SYS:SIMLIB/SEARCH

     where "xxxx" should be the name(s) of the SIMULA program(s)
     to be loaded.  (To execute write "EXECUTE" instead of "LOAD"
     in the above command string.)

     AVOIDING LINK-10 ERROR MESSAGES

     When a SIMULA program is loaded, you will sometimes get
     error messages from LINK-10.  The following description may
     help you to interpret those messages.

     The most common error message is
     ?LNKUGS undefined global symbols

     Here are some possible causes of this error message:

   > You have changed the attributes of a separately compiled
     SIMULA class, but not recompiled dependent modules.
     Recompile them with the ".COMP/COMP" command.

   > If the undefined global symbols are ".SIMVL" and ".SIMLV"
     then you have probably forgotten the switch /SEARCH on
     SIMLIB in your LOAD command.  These symbols are defined by
     programs using SIMSET and/or SIMULATION.

   > [For release 1B or 1C of DECsystem-10 SIMULA]:
          You have actually forgotten to list some separately
          compiled modules which your program needs.
     [For release 2 of DECsystem-10 SIMULA]:
          Separately compiled module names need no longer be
          listed in the LOAD command in release 2.  Instead,
          there must be .REL files corresponding to each .ATR
          file for separately compiled modules.  If the .ATR
          files are combined in a library, then the .REL files
          must be combined in a corresponding library.
DECsystem-10 SIMULA Language Handbook, part II            Page 18
Chapter 3.3 OPERATING PROCEDURES, COMPIL-CLASS COMMANDS


          Corresponding .ATR and .REL files should have the same
          filename before the extension and should be stored
          under the same ppn.

     You can find out which separately compiled modules are used
     by locating the EXTERNAL declarations in your main program.
     Alternatively, you can use the SIMDIR utility program.
     Write:
      .R SIMDIR
      DIRECTORY [1,4]
      SEARCH mainp USING
     where "mainp" should be the name of the main SIMULA program.
DECsystem-10 SIMULA Language Handbook, part II            Page 19
Chapter 3.4 OPERATING PROCEDURES, BATCH


3.4  BATCH

     The $SIMULA card is defined as a language card in SPRINT
     (Spooling PRocessor for INpuT).  The $SIMULA card precedes a
     SIMULA source program and causes SPRINT to copy the program
     onto disk and to insert a COMPILE monitor command into the
     control file.  The source program is ended by any SPRINT
     control card other than $MODE.

     When the job is run, the specified program is compiled and
     temporary relocatable binary and listing files are created.
     The listing file is printed as part of the job's output.

     The $SIMULA card does not cause execution of the program.
     Execution is initiated by an EXECUTE monitor command or by a
     $DATA or a $EXECUTE card.

     If execution is initiated by the $DATA card and no file name
     is specified on this card, then a "funny named" spooled card
     reader file containing the data following the $DATA card is
     created.  This file can be read by a SIMULA program if a
     logical file name is assigned to CDR.  The assignment can be
     done either with the ASSIGN monitor command or with a file
     specification in the SIMULA program.
     E.g.  ...NEW infile ("INFILE CDR:");

     Processor switches can be passed to the SIMULA compiler by
     including them in the command string.  Refer to Paragraph
     3.5 for a description of the SIMULA processor switches.

     If the processor switch (C) is given on the $SIMULA card a
     spooled LPT file containing program listing and cross
     reference listing will be created since the $SIMULA card
     generates a COMPILE command with /LIST as default.


     Card format:

     $SIMULA dev:name.ext [proj,prog] (SS...)/S1/S2.../Sn

     dev:          = a file structure name.  If omitted, DSK is
                     assumed.

     name.ext      = the name of the file to be created on disk.
                     If omitted, SPRINT assigns the filename
                     LN????  (where ?  represents a character
                     arbitrarily chosen by SPRINT to produce a
                     unique filename) with the extension .SIM.
                     However, when the user specifies only a
                     filename (with no extension), SPRINT will
                     not append any extension.  The source and
DECsystem-10 SIMULA Language Handbook, part II            Page 20
Chapter 3.4 OPERATING PROCEDURES, BATCH


                     relocatable binary files will be explicitly
                     deleted at the end of the job if no filename
                     was specified.  However, if an attribute
                     file was created during the compilation it
                     will not be explicitly deleted.  Where the
                     user has specified a filename, the
                     disposition of the files depends on the
                     protection the user has given to them.

     [proj,prog]   = a directory name other than that specified
                     on the $JOB card.  If omitted, the
                     project-programmer number on the $JOB card
                     is used.

     (SS...)       = processor switches to be passed to the
                     SIMULA compiler.  They must be enclosed in
                     parentheses without any commas or slashes.
                     However, a minus sign may precede any
                     switch.

     /S1/S2.../Sn  = the switches that control the mode of input
                     interpretation and the listing of the
                     compiled program.

       Switch        Meaning

     /ASCII          The input is read in ASCII mode.  If no
                     other card format switch is specified, then
                     the default is the mode indicated on the
                     /HOLLERITH switch on the $JOB card.

     /NOLIST         No listing file of the program is created.
                     If this switch is not specified, a listing
                     file will be created.

     /NOSUPPRESS     Trailing blanks are not suppressed.  The
                     default is no suppression.

     /SUPPRESS       Trailing blanks are suppressed.  The default
                     is no suppression.

     /WIDTH:nn       Columns 1 through nn (inclusive) are read.
                     Any remaining columns are treated as if they
                     contained blanks.  If this switch is not
                     specified or if no argument is specified,
                     then SPRINT will assume a value of 80.

     /026            The card deck is read in 026 card code.  If
                     no other card format switch is specified,
                     then the default is the mode indicated on
                     the /HOLLERITH switch on the $JOB card.
DECsystem-10 SIMULA Language Handbook, part II            Page 21
Chapter 3.4 OPERATING PROCEDURES, BATCH


                     This switch applies only to card-reader
                     input.  Input from other devices must be
                     read in ASCII code;  otherwise, an error
                     message is written in the log file and the
                     job is terminated.


     For a description of other SPRINT control cards that can be
     used in batch mode refer to DECsystem 10 OPERATING SYSTEM
     COMMANDS Chapter 3 Batch System Commands.

     An example of a SIMULA batch is given in H.6 CONTROL CARDS
     IN BATCH.
DECsystem-10 SIMULA Language Handbook, part II            Page 22
Chapter 3.5 OPERATING PROCEDURES, SWITCHES


3.5  SWITCHES

     The compiler switches are passed to the compiler in three
     ways:

     i) via a COMPIL-class command or a $SIMULA card in batch.
     In this case only the short one letter forms of the switches
     are accepted, possibly preceded by a minus sign or an
     unsigned decimal number e.g.  20P.  The switches must be
     placed inside parentheses without slashes.  Note that the
     switches LIST, NOLIST and CREF exist as switches directly in
     the command.  If used this way, however, these switches
     cause an LPT-file to be produced instead of an LST-file.

     ii) via the R SIMULA command.  A switch may be placed after
     any file descriptor.  Each switch begins with a unique
     letter, which means that the switch may be denoted with one
     or more letters.  Each switch must be preceded by a slash.

     iii) in the OPTIONS statement in the SIMULA source code.
     See below for format of the OPTIONS statement.

     The meaning of a switch is reversed if it is preceded by a
     minus sign.  The lower case letters can always be used
     instead of the corresponding upper case letter.

3.5.1 SWITCHES IN COMPILER COMMAND STRING

     Name       Format  Default/Meaning

     ARRAY      /A      /A
                        Generate code to check array boundaries.

     CREF       /C      /-C
                        Generate a cross reference listing on the
                        list file.  This switch also sets the
                        L-switch.

     DEBUGS     /D      /D
                        Generate a symbol table for SIMDDT.  

     EXTERNAL   /nE     /-E
                        Treat the source program as an external
                        class or procedure.  n is a decimal
                        unsigned number specifying the block
                        level at which the external program will
                        be compiled.  Default for n is 1.  /-E
                        indicates main program.  See below for
                        format in OPTIONS statement.

DECsystem-10 SIMULA Language Handbook, part II            Page 23
Chapter 3.5.1 SWITCHES IN COMPILER COMMAND STRING


     HELP       /H      /-H
                        Type this information at the user
                        terminal.  HELP can be placed anywhere
                        before the second source file descriptor.
                        HELP is only valid in connection with the
                        R command.

     IDENTIFICATION /I  /I
                        Generate a line number table to be used
                        for debugging with SIMDDT and for
                        run-time diagnostic messages.

     LIST       /L      /-L
                        Generate a listing of the source program.
                        If this switch is present before the
                        first source file specification then all
                        source files are listed.  If it is
                        present after say, the second source
                        specification, then the first will not be
                        listed.

     NOERR      /N      /-N
                        Suppress output of error messages on the
                        user's terminal.

     PAGE       /nP     /55P
                        Specify the number (n) of lines per page
                        in the source file listing.  If n > 55
                        then the default vale 55 is used.  See
                        below for extended format.

     QUALIFICATION /Q   /Q
                        Generate code to check that a class
                        instance has a certain qualification.

     RUNSWITCHES /R     /-R
                        File specifications will be read from TTY
                        at the start of the object program
                        execution.  See below for extended
                        format.

     SEARCH     /S      /S
                        Enables automatic search of ATR
                        libraries.  Libraries on the search list
                        (see below) are searched if an ATR file
                        corresponding to an external procedure or
                        class cannot be found.  See below for
                        extended format.

     WARNING    /W      /W
                        Warning messages are listed on the source
DECsystem-10 SIMULA Language Handbook, part II            Page 24
Chapter 3.5.1 SWITCHES IN COMPILER COMMAND STRING


                        listing (if any) and on the user's TTY.

     Y          /Y      /-Y
                        Write the line number table after the
                        source listing.  The IDENTIFICATION and
                        the LIST switches must be set.

     If the default setting (except for the LIST switch) is used
     throughout the compilation the message DEFAULT SWITCHES USED
     is printed after the source code on the listfile.  If any of
     the switches A, D, E, I, Q, R, S or W has been changed the
     message SWITCHES CHANGED FROM DEFAULT:  followed by a list
     of changed switches is printed.

3.5.2 SWITCHES IN THE OPTIONS STATEMENT

     All switches except HELP may occur in an OPTIONS statement.
     The OPTIONS statement is part of the source program and may
     be placed everywhere a comment is allowed.  The format of
     the switch is the same as for case ii) above.

     Format:

     OPTIONS(/switch/switch...);

     If the LIST switch is used in the OPTIONS statement then all
     lines including the OPTIONS statement itself are listed on
     the list file.  If -LIST is used then all following lines
     starting with the first line after the OPTIONS statement are
     suppressed up to the next LIST switch (if any).

3.5.2.1 Extended formats for switches E, P, R and S

     Note that extended formats for switches E, P, R and S are
     available.  The extended format for the E switch can only be
     used in the OPTIONS statement, whereas the longer forms of
     the P, R and S switches can also be used with the R SIMULA
     command (explicit execution of the compiler).

3.5.2.1.1 E switch

     /nE:<codeword>,[<checkoption>,]entryname
     /nE:FORTRAN,entryname
     /nE:F40,entryname

     <codeword> is CODE or QUICK and specifies an external
     assembly procedure.  FORTRAN specifies an external
     FORTRAN-10 (new FORTRAN) procedure and F40 an external
     FORTRAN-IV (old FORTRAN) procedure.

     <checkoption> is CHECK or NOCHECK (-CHECK).  CHECK implies
DECsystem-10 SIMULA Language Handbook, part II            Page 25
Chapter 3.5.2.1.1 E switch


     parameter checking and NOCHECK suppression of parameter
     checking.  If <checkoption> is omitted parameter checking is
     assumed.  NOCHECK and -CHECK are equivalent.

     Entryname is the entry name of the external procedure.

     See SIMULA Language Handbook appendix E for further details.

3.5.2.1.2 P SWITCH

     /P:"text"
     The text enclosed in quotes will be placed in the list file
     page heading.  The first line after the OPTIONS statement is
     printed on a new page.  This is also done for /P without
     argument.

3.5.2.1.3 R SWITCH

     /R:"file spec"
     The file specification has the same syntax as file
     specifications in a command.  File specifications will be
     read from that file at run time.  (See chapter 8 in the
     handbook).

     Examples:

     /R:"SYSIN"
     /R:"TTY:"        (equivalent to /R)
     /R:"DSKC:FILES.SPC[130,131]"

3.5.2.1.4 S SWITCH
     See 7.1.1.


3.5.3 CHANGING SWITCHES DURING COMPILATION

     At start of compilation the switches are set to their
     default values which may be changed via switches passed in
     the invoking commands.  The switches retain their values
     until they are changed in an OPTIONS statement.  All
     switches can be set (change value) or reset by the OPTIONS
     statement (except HELP).  This can for example be used to
     list only parts of the source program:
     OPTIONS (/LIST);....  OPTIONS(/-LIST);

3.5.3.1 SWITCHES THAT MAY BE CHANGED ANYWHERE IN THE SOURCE FILE

     The switches A, L, N, P, Q, S and W can be set and reset in
     OPTIONS statements placed troughout the SIMULA program.  The
     effect of several S switches, however, is dependent only on
     the order in which they are listed, not on the location in
DECsystem-10 SIMULA Language Handbook, part II            Page 26
Chapter 3.5.3.1 SWITCHES THAT MAY BE CHANGED ANYWHERE


     the program.  Thus all S switches may be gathered together
     at the start of the program with the same effect, as long as
     the order is the same.  Note that the libraries mentioned
     last will be searched first!

3.5.3.2 SWITCHES THAT MUST BE DEFINED AT THE START OF THE SOURCE
     PROGRAM

     The switches C, D, E, I, R and Y must either be passed to
     the compiler in the invoking command and/or they must appear
     in OPTIONS statements which are placed before the proper
     start of the SIMULA program.
DECsystem-10 SIMULA Language Handbook, part II            Page 27
Chapter 4 IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE


4.   IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE.
     ===================================================

     This chapter covers those parts of the language which are
     implementation defined, which means that a program using
     them may execute differently on different systems.  A
     programmer should normally avoid using implementation
     defined parts of SIMULA, but the information in this chapter
     should be helpful when programs are moved between different
     SIMULA systems and when unexpected diagnostics or results
     have been obtained.  This chapter does not cover
     input/output (chapter 8), language extensions (chapter 5),
     capacity restrictions (chapter 6) or separate compilation
     (chapter 7).


4.1  SYSTEM PREFIXES.

     The use of system classes as prefixes is restricted.  For
     efficiency reasons no subclass of FILE may be used as block
     or class prefix.

     Since the body of LINKAGE contains a local object, the
     prefix chain of a prefixed block may not contain this class
     or its subclasses LINK, HEAD and PROCESS.  The definition of
     MAIN PROGRAM in SIMULATION implies that SIMULATION must not
     occur as a prefix in a class instance, and the same
     restriction has been enforced for SIMSET.  It is however
     permitted to define subclasses of SIMSET and SIMULATION as
     long as these subclasses do not occur in object generators
     (i.e.  after NEW).

     According to the SIMULA definition, a class can be used as a
     prefix only at the block level at which it is declared.  The
     system classes SIMSET and SIMULATION should be considered to
     be declared at the level where one of them first occurs, and
     their attribute classes at a level one higher.  There may be
     several occurrences of the prefixes SIMULATION and/or SIMSET
     at this level (even concurrently active) although this
     should not be considered good programming practice.


4.2  VIRTUAL MATCHES.

     DEC-10 SIMULA only accepts the virtual matches listed in the
     Common Base (LABEL, SWITCH, PROCEDURE and <type> PROCEDURE),
     which is a restriction compared to IBM 360/370 SIMULA.  When
     a match is detected, it is compared with the previous match
     or, if it is the first match, with the virtual
     specification.  The kinds (LABEL, SWITCH or PROCEDURE) must
     be equal.  If the types are not equal, it must either be a
DECsystem-10 SIMULA Language Handbook, part II            Page 28
Chapter 4.2 IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE


     function procedure matched to a pure (no type) procedure, or
     it must be two REF type function procedures where the new
     match is qualified by a subclass of the qualification of the
     old match.  If a no type specification has been matched by a
     function procedure the result of the function is accessible
     only where the match can be seen at compile time.


4.3  EDITING AND DE-EDITING PROCEDURES.

     The character used to represent the power-of-ten symbol in
     input data is initially E, as in FORTRAN.  It may be changed
     to any other printable character except a digit, ., +, -,
     TAB or blank by a call to the procedure LOWTEN.

     The exponent created by PUTREAL and OUTREAL has two digits
     (possibly both 0) and is preceded by + or -.

     INFRAC and GETFRAC read a sequence of digits where two
     consecutive digits may be separated by a blank or a decimal
     point.  There can only be one decimal point in one number.

     An edit overflow causes the text field to be filled with
     asterisks and a message to be typed after program
     completion.


4.4  MATHEMATICAL SYSTEM FUNCTIONS.

     If a mathematical function exists in both single and double
     precision, the double precision routine is chosen if the
     argument type is LONG REAL, otherwise both argument and
     function value are considered to be REAL.  Since the Algol
     Report does not require a particular set of mathematical
     functions, the functions available in DEC-10 SIMULA are
     listed in table 4.1.  An asterisk (*) marks functions
     recommended in the Algol Report.  Argument types are:
     I-INTEGER, R-REAL, L-LONG REAL.
DECsystem-10 SIMULA Language Handbook, part II            Page 29
Chapter 4.4 IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE


     RECOMM. NAME    ARG     2ND ARG EXPLANATION

     *       ABS     R/L             modulus
             ARCCOS  R               inverse cosine
             ARCSIN  R               inverse sine
     *       ARCTAN  R/L             inverse tangent
     *       COS     R/L             cosine
             COSH    R               hyperbolic cosine
     *       EXP     R/L             exponential
     *       LN      R/L             natural logarithm
     *       SIN     R/L             sine
             SINH    R               hyperbolic sine
     *       SQRT    R/L             square root
             TAN     R               tangent
             TANH    R               hyperbolic tangent
     *       ENTIER  R/L             integer part
             MOD     I       I       remainder of first arg
                                     divided by second
     *       SIGN    I/R/L           Euler sign function


     Table 4.1: Mathematical functions.


4.5  COLLATING SEQUENCE, LETTER.

     The internal representation of CHARACTER variables is the 7
     bit ASCII representation which defines the collating
     sequence and the type conversion functions RANK and CHAR.
     The range of the former and the domain of the latter is thus
     the integers from 0 to 127, inclusive.  In the collating
     sequence, digits 0-9 are first, then upper case letters
     (A-Z) and lower case letters (a-z) (for details concerning
     special and national characters see appendix A).  A portable
     program should not use lower case letters or assume that
     digits precede letters, nor that letters are consecutive
     (letters A-Z can however safely be assumed to rank in
     alphabetic sequence).

     The Boolean function LETTER is TRUE for upper and lower case
     letters A-Z, but is FALSE for national letters $, # and @.


4.6  INITIALIZATION OF CHARACTER VARIABLES.

     A character variable in DEC-10 SIMULA is initialized to the
     null character with rank zero.  It will usually not be
     visible on the output medium when output.  In other SIMULA
     systems the initial value may often be output as a space
     (blank).
DECsystem-10 SIMULA Language Handbook, part II            Page 30
Chapter 4.7 IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE


4.7  SUBSCRIPT CHECKING.

     Each subscript of a subscripted variable is individually
     checked.  This is not done on all other systems.


4.8  RANDOM DRAWING.

     The random drawing procedures in DEC-10 SIMULA are based on
     Lehmers congruence method for pseudo random number
     generation.  The generator G is 5**15 and the modulus P is
     2**35:


                     U  = G U    (mod P)
                      i      i-1


                     X  = U /P
                      i    i


     If the initial value of a sequence of pseudo random numbers
     is negated, the antithetic variables are obtained.  The
     procedures always make the variables odd, so no
     initialization is necessary.  However, if initialization is
     omitted in a program it may loop indefinitely on other
     systems.

     Where the definition of a random drawing procedure assumes a
     parameter array to be monotonic, this is not checked for
     efficiency reasons.  However, no matter what the array
     contains, a reference outside the array will never occur.


4.9  QUALIFICATION CHECKING.

     If a class has become accessible by means of an INSPECT
     statement the qualification of the connected class is
     considered identical to that of the original class.
     However, a connected class can not be used as block or class
     prefix.
DECsystem-10 SIMULA Language Handbook, part II            Page 31
Chapter 4.10 IMPLEMENTATION DEFINED PARTS OF THE SIMULA LANGUAGE


4.10 SIMULATION PROCESSING TIME


     Unlike some other systems the SIMULATION real procedure TIME
     returns the current simulation time in single precision.
     This could imply that a simulation program may behave
     differently on DECsystem-10 SIMULA than on other systems.  
DECsystem-10 SIMULA Language Handbook, part II            Page 32
Chapter 5 LANGUAGE EXTENSIONS


5.   LANGUAGE EXTENSIONS.
     ===================

     Extensions in the source language representation are that !
     (exclamation mark) is equivalent to the keyword COMMENT, and
     that comments may occur anywhere between two basic symbols.

     Integer constants can be given in the radix representation
     bRa where b is the radix (in decimal) and a is the radix b
     representation of the number.  This is allowed for radices
     2, 4, 8 and 16.  As an example, 31 can be written 16R1F.

     National characters $, # and @ can be used as letters in
     identifiers.

     The WHILE statement permits a programmer to write

     WHILE b DO s

     which is equivalent to

     L:IF b THEN BEGIN s;  GOTO L END

     Here b is a Boolean expression and s is a statement (even a
     compound statement, a block or a prefixed block).  L is a
     label not occurring elsewhere in the program.  It is allowed
     to jump into s if it is a compound statement.

     The additional types LONG REAL and SHORT INTEGER are allowed
     in DEC 10 SIMULA.  LONG REAL is used for double precision
     floating point numbers, but SHORT INTEGER is equivalent to
     INTEGER and has been introduced only to get better
     compatibility with IBM 360/370 SIMULA.  All arithmetic types
     can be mixed in any way in expressions except as stated in
     chapter 6.2.

     The new system procedure CALL has the following effect:
     The execution of CALL(Y) resumes execution of the detached
     instance Y at its reactivation point.  Further operations
     are as if an object generator (NEW) had been used, i.e.  if
     Y detaches or terminates control returns to after the CALL
     statement.  Y must be detached and not operating when
     CALL(Y) is executed.

     The new system function PREV which is an attribute of
     LINKAGE gives as result the same value as LAST for a HEAD of
     a non-empty list, the same as PRED for a LINK which is not
     first in a list and the HEAD for the first LINK in a list
     (Common Base 17.2).

     The new system procedure BREAKOUTIMAGE is an attribute of
DECsystem-10 SIMULA Language Handbook, part II            Page 33
Chapter 5 LANGUAGE EXTENSIONS


     OUTFILE.  It is identical in effect to OUTIMAGE except that
     the trailing <CR><LF> of the image is not output (used
     mainly when writing to a terminal).

     The OPTIONS statement is not a language extension but a
     communication channel to the programming system, see Chapter
     3.

     Language extensions related to separate module compilation
     are described in Chapter 7.
DECsystem-10 SIMULA Language Handbook, part II            Page 34
Chapter 6 RESTRICTIONS


6.   RESTRICTIONS.
     =============


6.1  CAPACITY RESTRICTIONS.

     Capacity restrictions are a consequence of the internal
     design of DEC-10 SIMULA, such as the number of bits used
     internally to hold a particular quantity.  The significance
     of such restrictions at source language level is often
     difficult to explain, and the normal course of action taken
     by a programmer should be to rewrite a program when a
     violation has been diagnosed.  Some of the capacity limits
     are so high that a violation is very unlikely to occur
     whereas others are not.  The limitations are also dependent
     on the amount of core and disk space available.  The
     following limits must not be exceeded:

     LIMIT   QUANTITY

     10      number of subscripts in array
     64      block level
     255     formal parameters to procedure or
             (concatenated) class
     255     virtual quantities in (concatenated) class
     511     block state number
     65535   maximum line number in source module
     3072    number of differently spelled identifiers
             in source module
     32      display level
     20      concurrent single precision intermediate
             quantities
     4096    fixups
     200     subexpressions in simple statement
     1023    words in class instance record


     The meaning of some of these quantities can only be
     explained by reference to the syntax tree for a program as
     defined in the Algol Report and the Common Base.

     The maximum block state number is the size of the maximal
     set of <unlabelled block>:s in the syntax tree which is not
     cut by an instance of <prefixed block>, <class body>,
     <procedure body>, <connection> or <for statement>, except an
     instance of <prefixed block> or <procedure body> which is
     the root of the minimal subtree containing all the subblocks
     in the set.  In this definition a prefixed block or a
     procedure or class body should not be regarded as an
     unlabelled block.
DECsystem-10 SIMULA Language Handbook, part II            Page 35
Chapter 6 RESTRICTIONS


     The maximum display level is computed for a hypothetical
     program obtained by replacing all external declarations by
     their defining declarations.  In this program take the
     number of instances of <prefixed block>, <class
     declaration>, <procedure declaration>, <for statement>,
     <connection> and <actual parameter> corresponding to a
     formal parameter which is not known not to be by name in a
     path of the syntax tree.  Also add all occurrences along the
     path of <unlabelled block> which are separated from the
     enclosing scope by an instance of <for statement>,
     <connection> or <class body>.  The maximum display level is
     the maximal such value plus one or, if the outermost scope
     is a <prefixed block>, two.

     The number of fixups is obtained by adding weights of syntax
     entities in a single module:

     2       <conditional statement>
     4       <connection>
     1       <label definition>
     2       <unlabelled block>
     4       <procedure declaration>
     6       <class declaration>
     5       <prefixed block>
     2       <while statement>

     The number of concurrent intermediate quantities is
     minimized by reordering operands to commuting operators like
     +, *, :=, etc.  As an example, the expression 

     A:=A+(A+(A+(A+A)))

     has 6 intermediate quantities if A is a formal parameter
     called by name, but only one if A is a declared REAL
     variable.

     The number of subexpressions in a simple statement is well
     approximated by the number of basic symbols in it, with the
     following corrections:

     -1      <conditional expression>
     -1      parenthesis delimiting subexpression
     -1      left parenthesis delimiting parameters, switch
             index or array subscripts
     +1      long real constant
     +1      implicit arithmetic conversion or qualification
             check
     +1      actual parameter to class, prefixed block or
             declared procedure

     The size of a block instance record is two plus the size of
DECsystem-10 SIMULA Language Handbook, part II            Page 36
Chapter 6 RESTRICTIONS


     all its parameters and variables.  All name parameters
     require two words.  Otherwise, an ARRAY requires one word
     regardless of type.  LABEL and PROCEDURE parameters called
     by reference require two words, SWITCH by reference one
     word.  Simple quantities require two words if their type is
     LONG REAL or TEXT, otherwise one word.


6.2  PARAMETER CORRESPONDENCE.

6.2.1 Call by value.

     For an arithmetic array passed by value the actual type must
     be identical to the formal type.

6.2.2 Call by reference.

     A string is not a legal actual parameter for a text
     parameter called by reference.  This is a restriction
     compared to IBM 360/370 SIMULA.  An actual array parameter
     of type REF must have the same qualification as the formal
     array.

6.2.3 Parameters to system procedures and functions.

     Where an array is passed to a system procedure or function
     (DISCRETE, HISTD, LINEAR, HISTO) the type of the array must
     be REAL.  The last parameter to random drawing functions
     must be an INTEGER (declared, subscripted or remote)
     variable or an INTEGER value parameter.  The first three
     parameters to ACCUM must be REAL (declared, subscripted or
     remote) variables or REAL value parameters.


6.3  FOR STATEMENTS.

     The controlling variable of a for statement must not be of
     type TEXT.  Neither may it be a subscripted or remote
     variable, a name parameter or a function identifier.

     These restrictions to Algol 60 are recommended in SIMULA,
     but they have not been enforced in all implementations.
DECsystem-10 SIMULA Language Handbook, part II            Page 37
Chapter 6 RESTRICTIONS


6.4   MISCELLANEOUS RESTRICTIONS.

     A subclass must be declared after its prefix class.

     A switch which is an attribute of a terminated class
     instance can not be accessed.


6.5  RESTRICTIONS IN SIMULA WITH RESPECT TO ALGOL 60.

     In this section we list all differences between SIMULA and
     pure Algol 60 which may cause a pure Algol 60 program to
     behave differently when running as a SIMULA program.  All
     subsections are preceded by the number of a paragraph in the
     Algol Report which is not valid for SIMULA.

     (2.6) The entities <proper string>, <open string> and
     <string> do not exist in SIMULA.  They are replaced by TEXT
     variables and constants.

     (3.2) A <parameter delimiter> in SIMULA is a comma (,).
     Parameter comments are not permitted.

     (3.5.1) Integer labels are not permitted.

     (4.3.5) A transfer to a switch designator whose value is
     undefined is equivalent to a dummy statement except that
     side effects caused during the evaluation will remain.

     (4.6.1) FOR statements, see also 6.3.  The increment of a
     STEP-UNTIL element is evaluated once after the initial
     assignment to the control variable, once for every new
     repetition and once after the last repetition.  This may
     cause different behaviour if the increment is an expression
     which causes side effects or is dependent on the value of
     the control variable.

     (4.7.3.1), (4.7.3.2) The default parameter transmission mode
     for simple parameters is by value, not by name.

     (4.7.5.5) All formal parameters must be completely specified
     with respect to type and kind.  A standard (system)
     procedure or function can not be passed as an actual
     parameter to a formal parameter specified PROCEDURE or
     <type> PROCEDURE.  For actual to formal parameter
     correspondence, see also 6.2.1.

     (5.1) OWN variables are not permitted in SIMULA.  
DECsystem-10 SIMULA Language Handbook, part II            Page 38
CHAPTER 7  SEPARATE COMPILATION





7.   SEPARATE COMPILATION
     ====================


     A user-oriented description of separate compilation in
     SIMULA is given in chapter 4 of the DECsystem-10 SIMULA
     Language Handbook Part 1.  If you are not thoroughly
     familiar with the principles of separate compilation in
     SIMULA, you should read that chapter before continuing with
     this text.

     To implement the error checking during compile time, the
     compiler, when compiling an external module, generates an
     attribute file (extension ATR) which describes all
     accessible attributes of the object.

     When compiling a program which uses a previously compiled
     external module, the compiler must be told where to find the
     ATR-file of the used module.  This can be done in the
     EXTERNAL declaration or by using the SEARCH switch in the
     OPTIONS statement.




7.1  THE EXTERNAL DECLARATION


     The syntax of the <external declaration> is (!  stands for
     choice):

        <octal digit>::=0!1!2!3!4!5!6!7

        <octal number>::=<octal digit>!
                         <octal number><octal digit>

        <ppn>::=![<octal number>,<octal number>]

        <device>::=!<identifier>:

        <external identifier>::=<device><identifier><ppn>

        <external item>::=<external identifier>!
                          <identifier>=<external identifier>

        <external list>::=<external item>!
                          <external list>,<external item>
DECsystem-10 SIMULA Language Handbook, part II            Page 39
CHAPTER 7.1  SEPARATE COMPILATION. THE EXTERNAL DECLARATION.


        <external declaration>::=
                  EXTERNAL PROCEDURE <external list>!
                  EXTERNAL <type> PROCEDURE <external list>!
                  EXTERNAL CLASS <external list>

        <separately compiled procedure>::=<procedure declaration>
           !<external declaration><separately compiled procedure>

        <separately compiled class>::=<class declaration>!
            <external declaration><separately compiled class>

        <separately compiled main program>::=<program>

        <singly compiled main program>::=<program>


     The difference between <separately compiled main program>
     and <singly compiled main program> is that <separately
     compiled main program> contains at least one <external
     declaration> and <singly compiled main program> contains no
     <external declaration>.


     The external identifier is a file specification which may be
     used to retrieve the attribute file (after completing the
     specification by the extension ATR).  DSK:  is used for
     <device> if omitted.  The user's ppn is used if <ppn> is
     omitted.

     <device> must be a disk-like device.


     A separately compiled class or procedure may only refer to
     the following entities in the local environment of the
     external statement:

     - Formal parameters of the separately compiled class or
     procedure.

     - Other separately compiled classes with their externally
     accessible attributes.

     - Other separately compiled procedures.


     These other separately compiled classes and procedures are
     declared by external declarations in the source program of
     the separately compiled module.  Their declarations precede
     the proper start of the source code of the separately
     compiled class or procedure.
DECsystem-10 SIMULA Language Handbook, part II            Page 40
CHAPTER 7.1  SEPARATE COMPILATION. THE EXTERNAL DECLARATION.


     Example of full source text of a separately compiled class
     using these conventions:

       EXTERNAL PROCEDURE a;
       EXTERNAL CLASS b,c,d;
       b CLASS e(f);REF (c) f;
         BEGIN REF (d) g;
           g :- NEW d;
           a(g);
         END


     These external declarations before the beginning of a
     separately compiled class or procedure do not cause any
     copying of the declared external modules into the combined
     program.
     They simply inform the compiler that these external
     declarations will occur in the environment of an external
     statement introducing the module into another program, class
     or procedure.
     Thus, a, b, c and d in the example must be declared by
     external declarations in the environment of an external
     statement referring to e.

     According to SIMULA rules, separately compiled prefix
     classes must be copied into a program in the same block as
     their subclasses.

     Example;  "- - - -" indicates separate compilation:

     CLASS a; BEGIN ... END
     - - - -
     EXTERNAL CLASS a; a CLASS b; BEGIN ... END
     - - - -
     BEGIN COMMENT main program;
       EXTERNAL CLASS a,b;
       ...
     END


DECsystem-10 SIMULA Language Handbook, part II            Page 41
CHAPTER 7.1  SEPARATE COMPILATION. THE EXTERNAL DECLARATION.


7.1.1 TELLING THE COMPILER WHERE TO FIND EXTERNAL MODULES

     When an external module is compiled, two output files are
     usually produced, one with extension ATR and one with
     extension REL.  (If the actual code is in another language,
     another compiler produces the REL file, see appendix E.) For
     example, the separately compiled module X.SIM will yield the
     two output files X.ATR and X.REL.

     The ATR file is read by the compiler each time a module
     which uses X is compiled.  The REL file is used by the
     loader (LINK-10) to produce an executable program from
     several separately compiled modules.

7.1.1.1 SEARCH LIST

     When the compiler has encountered an external declaration,
     e.g.
          EXTERNAL CLASS X;
     and does not find the file <external identifier>.ATR (X.ATR
     in this case) in the user DSK area, it scans an (implied)
     SEARCH LIST consisting of file definitions (device name,
     file name, ppn).

7.1.1.1.1 DEFAULT SEARCH LIST

     If no SEARCH switch is given in the source file or via the R
     or COMPILE command, the default search list contains
     DSK:LIBSIM[user ppn] and SYS:LIBSIM.  The extension ATR is
     assumed throughout.

     LIBSIM and any other file on the search list must be
     recognized as a library.  In the library, the SIMULA name of
     the external module is used as a search key to find the
     corresponding ATR module.  FUDGE2 can be used to create an
     ATR library.  See 7.1.1.5.

     The SEARCH switch can be used to modify the search list by
     adding or deleting files.  If an explicit file definition
     (see 7.1.1.2) is given in the external declaration, the
     search list is not used.


7.1.1.2 EXPLICIT SPECIFICATION OF THE ATR FILE

     In the EXTERNAL declaration, you can write e.g.
          EXTERNAL CLASS x=x1[100,200];
     This tells the compiler that the CLASS x is described in the
     ATR file x1.ATR on the disk area for ppn [100,200].  The
     compiler will not look for other ATR files if you give the
     file name in this way.  If x1.ATR is not found, an error
DECsystem-10 SIMULA Language Handbook, part II            Page 42
CHAPTER 7.1  SEPARATE COMPILATION. THE EXTERNAL DECLARATION.


     message will be given.  If x1.ATR is a library (see
     7.1.1.5), the name x will be looked up, otherwise x1.ATR
     will be used directly.


7.1.1.3 THE SEARCH SWITCH

     The SEARCH switch can be used to modify the library search
     which is performed when X.ATR is not found.  You can tell
     the compiler to search other libraries than LIBSIM and on
     ppn's other than your own and SYS.  The possible variants
     are:

     a) /S with no argument.  This means that the default search
     list (see 7.1.1.1.1) is (re)established.  Any additional
     libraries are left on the list in their original places.

     b) /S:"file spec", puts the library mentioned on the search
     list.  The same library will only appear once on the search
     list.

     c) /-S with no argument.  No libraries will be searched.  /S
     will reestablish the standard search list, leaving other
     libraries off the list.

     d) /-S:"file spec" removes the specified library from the
     search list.

     Example:  OPTIONS(/-S/S:"LIBSIM[101,101]") removes
     LIBSIM.ATR and SYS:LIBSIM.ATR from the search list, leaving
     only LIBSIM.ATR[101,101].  OPTIONS(/S), if given later,
     reestablishes the standard list, but LIBSIM.ATR[101,101]
     will still be searched before LIBSIM.ATR[own ppn].  Note
     that the SEARCH switch can also be given via R SIMULA in the
     command string!  Note also that ALL search switches apply to
     ALL external declarations in the currently compiled module,
     since action is taken after scanning the whole program.


7.1.1.4 LOADING AND EXECUTING PROGRAMS WITH EXTERNAL MODULES

     Loading and execution commands are greatly simplified if the
     REL file corresponding to a given ATR file is found by
     simply substituting the extension REL for the extension ATR.
     If the ATR file is X.ATR, the REL file should be X.REL, and
     if the attributes of X are found in the library L.ATR, the
     code of X should be found in the library L.REL.  To simplify
     the load command, the compiler will tell LINK-10 to look for
     object code in REL files corresponding to the ATR files
     used.
DECsystem-10 SIMULA Language Handbook, part II            Page 43
CHAPTER 7.1  SEPARATE COMPILATION. THE EXTERNAL DECLARATION.


     A program can thus be (compiled and loaded and) executed
     simply by the command
          EXECUTE mainprogramname
     providing the external modules have been compiled in
     advance.

     Note that since the REL files are loaded in library search
     mode, explicit inclusion of files in the command string may
     be used to bypass the search for certain entry points.


7.1.1.5 Producing ATR and REL file libraries

     Libraries of ATR or REL files can be produced by copying
     together several ATR or REL files using the FUDGE2 program,
     which is described in the DECsystem-10 monitor commands
     handbook.

     IMPORTANT!!!  The /X switch must be used to produce an
     index, otherwise the SIMULA compiler cannot find the ATR
     modules.  Be careful to mention the extension ATR, since REL
     is assumed if no extension is given!




7.2  THE EXTERNAL SWITCH


     Short form: nE:<list>
     Long form:  nEXTERNAL:<list>
     Default:    -E


     Treat the source program as an EXTERNAL CLASS or PROCEDURE.
     -E indicates main program.  When /E or /-E appears in an
     OPTIONS statement it has no effect unless it appears before
     the proper start of the SIMULA program.

     n is an unsigned decimal number specifying the block level
     at which the external module is going to be declared in the
     main program.  n is optional and has the default value 1
     (the outermost block).

     :<list> can only be used in an OPTIONS statement placed at
     the start of the SIMULA specification program for an
     external procedure written in MACRO-10 or FORTRAN (detailed
     explanation in appendix E).
DECsystem-10 SIMULA Language Handbook, part II            Page 44
CHAPTER 7.3  SEPARATE COMPILATION.  RESTRICTIONS.


7.3  RESTRICTIONS ON SEPARATE COMPILATION


     A separately compiled class or procedure must not be
     declared as attribute to another class.

     A separately compiled class or procedure must not be copied
     indirectly, i.e. in a separately compiled class or procedure
     all external declarations must precede the proper start of
     the class or procedure declaration.

     In an EXECUTE, LOAD or DEBUG monitor command, source files
     should be listed in compilation order, with the main program
     last.  The compilation order must be such that attribute
     files are available when referred to.

     Error messages from LINK-10 because of missing REL files are
     explained at the end of section 3.3 in this handbook.





7.4  SIMDIR UTILITY PROGRAM


     With the SIMDIR program you can easily find out:
     > Which separately compiled modules are required by one or
     several main programs.
     > Which program modules require a certain separately
     compiled procedure or class.
     To start the program type:
     .R SIMDIR
     SIMDIR responds with a "*" , signalling that it is ready for
     a command.

     In the simplest case, you can now write:

        SEARCH /ALL REQUIRED BY main

     This will list all modules on your PPN which are used by the
     module main.  main is usually a SIMULA main program, but can
     be a separately compiled module.

        SEARCH /ALL USING proc

     This will list all modules on your PPN which use the
     separately compiled module proc.

     You can precede the SEARCH command with a DIRECTORY command
     to tell the system to include other PPN:s in the search.
DECsystem-10 SIMULA Language Handbook, part II            Page 45
CHAPTER 7.4  SEPARATE COMPILATION.  SIMDIR UTILITY PROGRAM.


     For example, you can write:

        DIRECTORY [*,*]
        SEARCH /ALL USING proc

     This will give a listing of all SIMULA programs on all PPN:s
     which require your separately compiled procedure proc.

     As input SIMDIR requires ATR-files from separately compiled
     classes and procedures and REL-files from main programs.
     This means that SIMDIR only works when such ATR and REL
     files are present for the programs to be listed.

     The syntax of SIMDIR commands follows:

     <SEARCH-command>::= SEARCH <pattern> [<relation>[<pattern>]]
        <relation>::= USING ! REQUIRED BY
        <pattern>::= [<device>][<filename>][<ppn>][<switches>]
        <ppn>::= <left bracket><ppn1><right bracket>
        <ppn1>::= SELF ! OTHERS ! <pnr>,<pnr>
        <pnr>::= ! * ! <octal number>
        <switches>::= <switch> ! <switches><switch>
        <switch>::= /<switchname>
        <switchname>::= ALL ! MAIN ! CLASSES ! PROCEDURES !
                FPROCEDURES ! SPROCEDURES ! MPROCEDURES !
                FAST ! TTY
        <device>::= <name>:
        <filename>::= <name>

        SEARCH <pattern> means that all modules matching the
        pattern will be searched for and listed.

        SEARCH <pattern> <relation> means that all modules
        matching the pattern will be searched for and listed
        together with the modules which have the given relation
        to the modules.

        SEARCH <pattern> <relation> <pattern> means that all
        modules matching the first pattern and having the given
        relation to any module matching the second pattern are
        listed.

        A module matches a pattern when it matches all components
        of that pattern.  If any component is missing in a
        pattern, then all modules match that component.  The
        pattern may not be empty, however.

        There are two special PPN:s that you may use in a
        pattern:  [SELF] is the LOGIN PPN.  [OTHERS] stands for
        all PPN's except [SELF] which have been given in
        DIRECTORY commands.
DECsystem-10 SIMULA Language Handbook, part II            Page 46
CHAPTER 7.4  SEPARATE COMPILATION.  SIMDIR UTILITY PROGRAM.


        Explanation of switches:
                ALL             All modules match
                MAIN            Main programs match
                CLASSES         Classes match
                PROCEDURES      Procedures match
                FPROCEDURES     FORTRAN procedures match
                MPROCEDURES     MACRO-10 procedures match
                SPROCEDURES     SIMULA procedures match
                FAST            Do not output PPN
                TTY             Change output device
                                temporarily to TTY.


     <DIRECTORY-command>::= DIRECTORY <directories>
        <directories>::= <directory> ! <directory>,<directories>
        <directory>::= [<switch>] <ppn> [<switch>]
        <switch>   ::= /MAIN ! /-MAIN

        Include the given directories when searching.
        /MAIN means that all modules are fetched from this
        directory, /-MAIN that only external classes and
        procedures are fetched.  Default is /-MAIN.


     <LIST-command>::= LIST <file specification>

        Program output is written on the specified file.  Default
        is DSK:SIMDIR.LST


     <CLOSE-command>::= CLOSE

        The current list file is closed.


     <EXIT-command>::= EXIT

        Close current list file (if any) and return to monitor.


     <HELP-command>::= HELP [ /TTY ]

        Output help-text.


     All "reserved words" (upper case letters above) can be
     abbreviated arbitrarily.  Any conflicts are resolved as
     follows :
        /M means /MAIN
        /F means /FAST
DECsystem-10 SIMULA Language Handbook, part II            Page 47
CHAPTER 7.4  SEPARATE COMPILATION.  SIMDIR UTILITY PROGRAM.


     When SIMDIR is started a *D[S]/M command is automatically
     performed.


     EXAMPLES:

     List all SIMULA modules on your own PPN
      .R SIMDIR
      *S/ALL
        .
        .
        .

     List those of your own modules which are used by others in
     the same project.
      .R SIMDIR
      *DIR [,*]/M
      *SEARCH [SELF] REQ BY [OTHERS]
        .
        .
        .
DECsystem-10 SIMULA Language Handbook, part II            Page 48
CHAPTER 8 OBJECT PROGRAM I/O


8    OBJECT PROGRAM INPUT-OUTPUT
     ===========================


8.1  INTRODUCTION


     The SIMULA run-time system (RTS) supports input from and
     output to files on auxiliary memory like disk storage,
     DECtape and magnetic tape and standard peripherals like line
     printer, card reader and punch, paper tape reader and punch.
     These peripherals will normally be spooled in a time-sharing
     environment but RTS will not distinguish between spooled and
     unspooled devices.

     Only ASCII (=ISO-7) mode input and output is supported.
     Binary I/O can be performed only with external assembly
     procedures (see chapter 7 and appendix E).

     Files can be accessed sequentially or randomly through class
     directfile.  Random access through directfile is however
     possible only for files stored on disk.

     The I/O subsystem of RTS works interactively with the user
     as described in later sections.  When an error condition
     occurs the user is consulted for corrective action if
     recovery is possible, otherwise a run-time error occurs.

     The various dialogue messages are described in appendix D.
     The rest of this chapter is concerned with how to define
     files, run-time switches and various aspects of the
     different input-output classes of SIMULA.
DECsystem-10 SIMULA Language Handbook, part II            Page 49
Chapter 8.2 OBJECT PROGRAM I/O, HOW TO DEFINE A FILE


8.2  HOW TO DEFINE A FILE


     A new file is created with the object generator NEW.  File
     objects can be of four different classes:

     infile
     outfile
     printfile
     directfile

     Printfile is a subclass of outfile.  The argument to these
     file classes should be a text variable or a text constant
     containing a file definition.  The file definition binds the
     file object to a device and a physical file.
     File definition format:

     logicalname file-descriptor

     The logical name must consist of one to six alphanumeric
     characters.  The characters percent (%) and dollar ($) will
     also be accepted.  The logical name is used in all run-time
     error messages concerning I/O.  The following text will
     precede all such errors:
     ERROR FOR FILE:  logicalname
     The logical name need not be unique, but the user is advised
     to have unique names for ease of identification.  The
     logical name is also used to link file class arguments to
     file definitions from the specification file as described
     below.

     Examples:

     FILE1:-NEW infile ("FILE1 MYFILE.DAT");
     x:-NEW outfile("FILE2 RESULT.LST<077>");
     INSPECT NEW directfile ("dir random") DO ...

     The logical name may be omitted from the file definition.
     In this case the file name will be used as logical name or
     if the file name is missing, the device name is used.

     Examples:

     Y:-NEW outfile("LPT:");                 Logical name is LPT
     Z:-NEW infile("TEXT.ASC");              Logical name is TEXT
     W:-NEW infile("W");                     Logical name is W

     The logical name must be delimited by at least one space or
     tab.

DECsystem-10 SIMULA Language Handbook, part II            Page 50
Chapter 8.2 OBJECT PROGRAM I/O, HOW TO DEFINE A FILE


     The complete format of a file descriptor is:

     device:filename.extension[ppn]<protection>/switch/switch ...

     Default for device is DSK.  Device may be any physical
     device name or logical device name previously defined with
     the ASSIGN command.  Default for file name is logical name.
     Default for extension is no extension.  Device, filename and
     extension may contain letters (lower case are converted to
     upper case), digits, percent and dollar sign.

     Default for ppn is user's ppn.  The format is:

     [projectnumber,programmernumber,sfd1,sfd2,...]

     The ppn must always end with a right square bracket.
     Default for protection is the installation defined default
     protection, normally 057.  Switches are covered in section
     8.3.  Trailing or leading spaces and tabs are ignored in the
     file descriptor.

     A file descriptor may contain an asterisk in any of the
     fields except protection.  This will cause a dialogue at
     run-time.  The following message is typed on the terminal:

     PLEASE SPECIFY ADDITIONAL INFORMATION FOR FILE:  logicalname
     *

     The user can now enter missing parts of the file descriptor
     and also override previously defined parts.

     Example:

        ...  NEW infile ("FILE1 *");

     RTS types:

     PLEASE SPECIFY ADDITIONAL INFORMATION FOR FILE:  FILE1
     *INFIL.DAT

     The system will repeat this request until all fields
     containing asterisks are defined.

     The source contains:  ...  NEW infile("file2 *:*");

DECsystem-10 SIMULA Language Handbook, part II            Page 51
Chapter 8.2 OBJECT PROGRAM I/O, HOW TO DEFINE A FILE


     The following dialoque might take place:

     PLEASE SPECIFY ADDITIONAL INFORMATION FOR FILE:  file2
     *INFIL.DAT
     PLEASE SPECIFY ADDITIONAL INFORMATION FOR FILE:  file2
     *DSK:

     This is one way in which the user can defer the binding
     between file and file object until run-time.

     Another way is to let the SIMULA program use data from TTY
     or a file on any other device to create parameter strings to
     NEW file creations.

     A third way to achieve this is the specification file
     facility.  This gives the user the ability to specify all
     his file definitions in a special file that is read by RTS
     before start of execution.  This file may also contain
     run-time switches.  The compile switch RUNSWITCHES must be
     used at compilation.  This switch defines the specification
     file which can be TTY or a DSK file.  /R without argument
     denotes TTY.  In that case the RTS will type ENTER FILE
     DEFINITIONS before execution start and the user may supply
     file definitions and switches.  The TTY input is terminated
     with a carriage return.

     Example:

      .EXECUTE SIMPRO(R)
      SIMULA:  SIMPRO
      LINK:  Loading
      [LNKXCT  SIMPRO Execution]
      ENTER FILE DEFINITIONS:
      *FILE1 INFILE.DAT[130,133]
      *FILE2 OUTFIL.DAT
      *SCRATCH DUMMY
      *
      EXECUTION STARTED

     The file definitions have the same format as in the argument
     to the file classes.  The logical name must be unique, since
     RTS uses this name to link the file definitions in the
     specification file to the file class arguments.  RTS will
     build a table from the specification file.  When a new file
     object is created this table is searched to see if the file
     was defined prior to execution.  Information in the
     specification file overrides the information in the file
     class argument.

     The file definitions may also be a part of SYSIN.  This is
     accomplished with /R:"SYSIN" in the OPTIONS statement in the
DECsystem-10 SIMULA Language Handbook, part II            Page 52
Chapter 8.2 OBJECT PROGRAM I/O, HOW TO DEFINE A FILE


     source code.  If SYSIN is read from TTY the dialogue
     described above will take place.  If SYSIN is a disk file,
     the file definitions are read from SYSIN.  They must then be
     terminated with an empty line to separate them from the rest
     of the SYSIN input to be read by the program.

     It is also possible to use indirect specification files.
     This is denoted with the normal indirect delimiter:

     @file-descriptor

     Indirect files can only be read from disk and must not
     contain any definitions of indirect files.  They must not be
     stored in sub-file directories.

     Example:

      .EXECUTE SIMPRO(R)
      SIMULA:  SIMPRO
      LINK:  Loading
      [LNKXCT  SIMPRO Execution]
      ENTER FILE DEFINITIONS:
      *@FILES.SPC
      *
      EXECUTION STARTED

     Specification files on disk need not be terminated with an
     empty line.  It is possible to have more than one indirect
     specification file, but they can not be nested.  SYSIN may
     also be used as an indirect specification file.
DECsystem-10 SIMULA Language Handbook, part II            Page 53
Chapter 8.3 OBJECT PROGRAM I/O, RUN-TIME SWITCHES


8.3  RUN-TIME SWITCHES


     Switches that appear before the file definition or, in a
     specification file, alone on a line are called global
     switches.  Other switches are termed local.  The same switch
     may be either local or global as defined below.  All
     switches can be designated with their first letter or with
     as many letters as desired.  The full names are given below.

     ACCESS:APPEND
     This switch can only be local and is applicable to outfiles
     and printfiles only.  It means that the file will be written
     in append mode, i.e.  the output will be appended to the
     file if it already exists.

     ACCESS:RONLY
     This local switch is applicable to directfiles only.  It
     means that the directfile can only be read, not modified.

     BUFFER:n

     type     n       meaning

     global   =<32    
                      n is the number of buffers in the buffer
                      ring for all subsequent files, unless they
                      have a local BUFFER switch or a new global
                      BUFFER switch appears
     global   >32     
                      n defines the area in words to be allocated
                      for buffers (necessary space for all files
                      defined in the specification file will
                      however always be allocated regardless of
                      this value)
     local    =<32    
                      n is the number of buffers in the buffer
                      ring for this file
     local    >32     
                      n defines the size of one buffer in a
                      two-buffer ring (applicable to mag-tape
                      only)

     FILES:n
     This switch defines the number of files to be handled
     simultaneously during execution and helps the run-time
     system to allocate an appropriate buffer area before start
     of execution.  Since garbage collection will be invoked when
     the buffer area overflows, FILES can be used to avoid this.
     FILES is a global switch only.  Default for n is 0.
DECsystem-10 SIMULA Language Handbook, part II            Page 54
Chapter 8.3 OBJECT PROGRAM I/O, RUN-TIME SWITCHES


     IMAGESIZE:n
     A local switch applicable to directfiles only.  It defines
     the record size which will be n+2 to allow for carriage
     return and line feed.  If this switch is not given, the
     image size specified via the parameter to OPEN will be used
     to define n.

     HELP
     Prints the contents of the help file SIMRTS.HLP on the
     user's terminal.

     LIMIT:n
     LIMIT specifies the number of blocks that may be written on
     an outfile or printfile.  Default is no limit.  A run-time
     error occurs if this limit is exceeded.  LIMIT may only be
     used as a local switch.

     NUMBERED
     This switch can be applied only as a local switch in the
     specification of an outfile, printfile or directfile.  On a
     call to outimage, the last bit of the first word of the
     image is set to 1.  The actual line number must be supplied
     by the SIMULA program in the five first characters of the
     image.
     NOTE!!  The image must start on a word boundary!
     If the image is a main text or starts a main text, this is
     always the case.  According to DEC standard, the sixth
     character should be a tab (char(9)).  NUMBERED implies
     WORDALIGNED.  See below.

     SIZE:n
     This switch defines the initial number of blocks (n) to be
     allocated to an outfile or directfile.  Default for n is 5.
     At least n blocks will always be allocated but the file can
     however become larger than this size.  The switch will
     improve the efficiency when the file is large.  SIZE may
     only be used as a local switch.

     A numeric switch value must be given in the form of a
     decimal integer optionally followed immediately by the
     letter K or P, signifying multiplication with 1024 and 512
     respectively.

     WORDALIGNED
     This switch is local and applies to outfiles and printfiles.
     Directfiles are always word-aligned.  The WORDALIGNED switch
     forces each image in the buffer to start on a word boundary.
     If in addition the internal image is word-aligned, the image
     can be copied more efficiently to the buffer.  Main texts
     are always word-aligned.
DECsystem-10 SIMULA Language Handbook, part II            Page 55
Chapter 8.3 OBJECT PROGRAM I/O, RUN-TIME SWITCHES


     All switches except FILES and HELP may appear in the text
     argument to a file object.

     Example:

     INSPECT NEW outfile("RES.DAT/A:APPEND/LIMIT:100") DO ...
DECsystem-10 SIMULA Language Handbook, part II            Page 56
Chapter 8.4 OBJECT PROGRAM I/O, CLASS INFILE


8.4  CLASS INFILE


     An infile is always read sequentially.  Each inimage will
     return the next record in the image defined for the file,
     which is the text variable specified in the OPEN call.  A
     record is terminated with either of line feed, altmode, form
     feed or vertical tab.  Carriage returns and nulls are
     ignored on input.  Form feed, altmode and vertical tab are
     transferred to the image, while the line feed is not moved.
     This means that if a file which contains, say, form feeds,
     is copied with a very simple SIMULA program, the new copy of
     the file will have an extra carriage return+line feed
     sequence appended after each form feed, since OUTIMAGE
     appends these two characters after each image.  (Unless the
     copying SIMULA program explicitly checks for form feeds in
     the copied text).

     If the external image is longer than the image size then a
     run-time error occurs.  If the external length is shorter
     than the image size, the rest of the image is padded with
     blanks.

     The procedure ENDFILE will return TRUE when the end of file
     has been passed.  The image will contain a special end of
     file record consisting of the two characters /* followed by
     spaces when INIMAGE is called and end of file is
     encountered.

     The following scheme may be used to process an infile:

             REF(INFILE)F;
             F:-NEW infile("...");
             F.OPEN(...);
             .
             .
             .
             F.INIMAGE;
             WHILE NOT F.ENDFILE DO
             BEGIN
                     process one record;...;
                     F.INIMAGE
             END;
             .
             .
             F.CLOSE;

     If ENDFILE returns TRUE when INIMAGE is called a run-time
     error occurs.

     The following devices can be used for infile:
DECsystem-10 SIMULA Language Handbook, part II            Page 57
Chapter 8.4 OBJECT PROGRAM I/O, CLASS INFILE


     TTY, disk, DECtape, magnetic tape, card reader and paper
     tape reader.
DECsystem-10 SIMULA Language Handbook, part II            Page 58
Chapter 8.5 OBJECT PROGRAM I/O, CLASS OUTFILE


8.5  CLASS OUTFILE


     Outfiles are written sequentially.  The user may allocate as
     many blocks as appropriate with the SIZE switch.  If SIZE is
     omitted at least 5 blocks will be allocated.  If the initial
     allocation is used up, the operating system will
     automatically allocate as much as needed.

     The LIMIT switch may be used to stop unintentional endless
     loops with output.  The argument to LIMIT defines how many
     blocks will be written on a file.  A run-time error is
     invoked if this limit is exceeded.

     On OUTIMAGE, IMAGE.STRIP is output with carriage return and
     line feed appended.  A special procedure BREAKOUTIMAGE
     exists to allow output on TTY without carriage return and
     line feed.  This procedure can be used on any device.
     BREAKOUTIMAGE strips away only spaces after POS before
     outputting the line.

     Outfiles can also be written in append mode with the switch
     ACCESS:APPEND.  If the file already exists, the new output
     is appended to the existing file.  The minimum allocation of
     5 blocks does not apply to files written in append mode.
     All unused space will be released at CLOSE.

     Outfiles can be written on the following devices:
     TTY, disk, DECtape, magnetic tape, line printer, card and
     paper tape punch.
DECsystem-10 SIMULA Language Handbook, part II            Page 59
Chapter 8.6 OBJECT PROGRAM I/O, CLASS PRINTFILE


8.6  CLASS PRINTFILE


     This file class is a subclass of outfile.  The following
     differences exist compared to outfile:

     - SIZE does not apply to printfile, i.e.  the user can not
     allocate a specific amount of blocks, all unused space will
     be released when the file is closed.

     - a form feed is output when the file is opened on a device
     other than TTY.

     - a form feed is output after n lines, where n is the
     current value of the internal variable linesperpage (set by
     the user with the procedure LINESPERPAGE or defaulted to
     60).

     - the following special procedures exist for printfile to
     control the layout of the printed file:
     SPACING, LINESPERPAGE, EJECT.  These procedures are
     described in the SIMULA Language Handbook Part I.

     It is often inconvenient to get a form feed on TTY after n
     lines of output, especially in conversational applications.
     This can be circumvented with the following statement:
     SYSOUT.LINESPERPAGE(-1) which will set n to 2**18-1, which
     will be the same as no form feeds in most practical cases.

     Printfiles can be written on the same devices as outfiles.
DECsystem-10 SIMULA Language Handbook, part II            Page 60
Chapter 8.7 OBJECT PROGRAM I/O, CLASS DIRECTFILE


8.7  CLASS DIRECTFILE


     A SIMULA directfile is a file that can be accessed randomly
     by specifying the desired record's relative number in the
     file.  This is done with the LOCATE procedure.  The records
     are numbered sequentially from 1 upwards.

     The operating system permits the user to create directfiles
     randomly.  It is e.g.  possible to start from scratch and
     write, say, record 100.  The operating system will then
     write blocks 1 to 99 and fill them with nulls and then write
     block 100.  The file can then be expanded randomly, the
     operating system will allocate needed space and fill
     unwritten blocks with nulls.

     Definitions:

     Image size is the length of the text variable used at OPEN.

     Record size is the length of each external record in the
     file, this length is fixed for directfile.

     Actual record size is the number of characters preceding
     line feed, not counting carriage return, or number of
     characters preceding and including vertical tab, altmode or
     form feed.

     Physical record size is the number of words needed to store
     one record in the file;  all records start on a word
     boundary.

     A disk block consists of 128 words, 640 characters, which
     gives an image size of 638 characters not counting carriage
     return and line feed.  The record size for a directfile is
     fixed and is defined with the IMAGESIZE switch or, if the
     switch is not given, by the length of the text variable
     given on the first call of OPEN for the file.  For each
     following inimage or outimage call, the current image of the
     file  m u s t  have the size used at open.

     A directfile record, the external image, is thus n+2
     characters long, where n is the value of the IMAGESIZE
     switch argument.  The record size may be smaller, greater
     than or equal to the physical block size.  RTS will compute
     the relative block number from the record number and the
     physical record size.

     On output, CR-LF is appended after the end of the image in
     the buffer.  Both on input and output, the  w h o l e  image
     is always transferred to or from the buffer, regardless of
DECsystem-10 SIMULA Language Handbook, part II            Page 61
Chapter 8.7 OBJECT PROGRAM I/O, CLASS DIRECTFILE


     any special characters.  It is thus possible to embed
     control characters, e.g.  line feed, carriage return, form
     feed, in the image.

     The ENDFILE procedure returns TRUE when both of the
     following two conditions are true:

     a) LOCATION identifies a record outside the file range,
     i. e. LOCATION < 1 or LOCATION > limit, where limit is an
     internal variable containing the highest record number in
     the file.  This variable is computed from record size and
     file length at OPEN and is updated by OUTIMAGE when the file
     is expanded.

     b) INIMAGE has been called at least once, and the last call
     was made after the last call for OUTIMAGE, and the last call
     for INIMAGE was made with a location identifying a record
     outside the file range as defined above.

     ENDFILE also returns TRUE when the file is not open.

     If LOCATE identifies a not yet written record, a subsequent
     call on ENDFILE will return FALSE.  INIMAGE will return the
     end of file record (see section 8.4) when an unwritten
     record is read.

     Example:

        D:-NEW directfile(...);
        .
        .
        .
        D.LOCATE(I);
        D.INIMAGE;
        IF D.ENDFILE THEN action for end of file;
        IF D.IMAGE.STRIP="/*" THEN action for not written record;
        .
        .

     This will also work for empty files.

     Directfiles can only be stored on disk.


     If you intend to read a directfile sequentially from start
     to end, you can save about 30% of the CPU time by declaring
     it as an INFILE in your SIMULA program.
DECsystem-10 SIMULA Language Handbook, part II            Page 62
Chapter 8.8 OBJECT PROGRAM I/O, BASCICIO


8.8  CLASS BASICIO


     This class contains actions to generate a standard infile
     called SYSIN and a standard printfile called SYSOUT.  These
     files are generated and opened at start of execution.  They
     will be automatically closed at end of execution, but the
     user may close and reopen them as he wishes.  SYSIN and
     SYSOUT will normally be assigned to TTY by RTS, but the user
     may prevent this through definitions in the specification
     file, e.g.:

     SYSIN INDAT.DAT
     SYSOUT RESULT.LST/ACCESS:APPEND

     The user can also use the ASSIGN command before the
     execution and assign SYSIN and SYSOUT to, say, DSK.  SYSIN
     will then be read from a file called SYSIN without extension
     and SYSOUT will be written on a file called SYSOUT also
     without extension.

     If TTY is used as device for SYSIN or SYSOUT, the image size
     will initially be set to the carriage width of that
     terminal.  In other cases the image size of SYSIN will be 80
     characters and the image size of SYSOUT will be 132
     characters.



8.9  DEVICE CONTROL CHARACTERS IN I/O

     Most ASCII(ISO) device control characters are illegal in
     SIMULA source program TEXT and CHARACTER constants.  They
     can however be entered into TEXT and CHARACTER variables by
     using the built-in function CHAR.

     On output, all 128 ASCII(ISO) characters are output just as
     they appear in the image of the outfile.

     On input for directfiles, all 128 ASCII(ISO) characters are
     also input just as they were output.

     On input for infiles, the following special handling of
     certain device control characters will occur:
DECsystem-10 SIMULA Language Handbook, part II            Page 63
Chapter 8.9 DEVICE CONTROL CHARACTERS IN I/O


      Octal Decimal Name         Action

      000    0      Null         Ignored in input.
      011   10      Line Feed    The character is not input, but
                                 will finish a line, so that the
                                 next INIMAGE will continue with
                                 the character following the line
                                 feed.
      013   11      Vertical Tab The character will be input as
                                 the last character of a line,
                                 and the next INIMAGE will
                                 continue with the following
                                 character.
      014   12      Form Feed    Same as vertical tab.
      015   13      Carr. Return Ignored in input.
      032   26      Control-Z    Signifies end-of-file in input
                                 from a terminal.  Otherwise
                                 copied directly.
      033   27      Escape       Same as vertical tab.  
DECsystem-10 SIMULA Language Handbook, part II            Page 64
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


9.   DEBUGGING SIMULA PROGRAMS WITH SIMDDT
     =====================================


     SIMDDT is an interactive program that is used to debug
     SIMULA programs.  SIMDDT allows the user to:

     a) set up to 20 breakpoints (1) in the program

     b) continue from a breakpoint

     c) display the current breakpoint settings

     d) remove a breakpoint setting

     e) change the contents of a variable

     f) display the contents of a variable

     g) display all variables in the current storage pool

     h) display the dynamic operating chain

     i) display all scheduled processes

     k) direct the output from SIMDDT to a file instead of the
     user terminal

     l) display the source program
















-----------------

(1) At a breakpoint the normal program execution  is  interrupted
and  the  debugging  program  SIMDDT  gets  control.  SIMDDT will
perform the tasks that were specified  when  the  breakpoint  was
set.
DECsystem-10 SIMULA Language Handbook, part II            Page 65
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


9.1  LOADING AND STARTING SIMDDT


     The SIMDDT program is self-relocating and it is read from
     disk by a SIMRTS routine when requested.  The SIMULA
     compiler switches I (IDENTIFICATION, produces a line number
     table) and D (DEBUGS, produces a symbol table) must have
     been set during compilation if the program is to be debugged
     with SIMDDT.  The switches are set by default but if they
     were set off, SIMDDT will give incomplete information to the
     user.

9.1.1 DEBUG

     If the source file has extension SIM or the /SIMULA switch
     is used, the DEBUG monitor command will ensure that SIMDDT
     is read into low segment core and started before the SIMULA
     program execution starts.  Note that this will not work if
     the first file in the DEBUG command is placed on another
     ppn.  You will get DDT instead of SIMDDT.  Use the LOAD plus
     the REENTER commands to get SIMDDT.
     Command example:

     .DEBUG MYPROG.SIM


9.1.2 LOAD, SAVE, GET, REENTER

     The monitor commands LOAD plus SAVE will save the user
     program not including SIMDDT on disk.  If issued directly
     after LOAD (+SAVE) or GET, the REENTER command will cause
     SIMDDT to be read into low segment core and started.  The
     START monitor command will start user program execution
     directly.
     Command example:

     .LOAD MYPROG.SIM
     .SAVE
     .REENTER


9.1.3 ↑C - REENTER

     After the SIMULA program has started to execute without the
     debugging system it is usually possible to invoke SIMDDT.
     One or two ↑C commands will stop execution and return the
     terminal to monitor mode.  The REENTER monitor command will
     load and start SIMDDT, which will give the number of the
     source program line which corresponds to the statement which
     was interrupted by ↑C.  This is very useful when the program
     is looping.  ↑C can also be used if SIMDDT is already
DECsystem-10 SIMULA Language Handbook, part II            Page 66
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


     loaded.  If the user program was expecting input from the
     user terminal when the ↑C was given (i.e.  if one ↑C is
     sufficient), then SIMDDT will not start until the input has
     been typed.
     Note that SIMDDT will be started when the execution has
     reached the user source program level, i.e.  an I/O
     operation must be completed.  In some cases it will not be
     possible to break the execution and the user will be advised
     to try again.
     Command example:

     .EXECUTE MYPROG.SIM
     ↑C
     ↑C
     .REENTER


9.1.4 Program errors

     After a run time error has been detected, the SIMDDT program
     will be called to write the error message and the source
     program line number which holds the statement that caused
     the error.  Appendix H contains an example on how to handle
     program errors in a batch run.


9.1.5 CONTINUE after program exit

     The CONTINUE monitor command can be used to start SIMDDT
     after a normal program exit.  The variables in the storage
     pool can be displayed with the VARIABLES command.


9.1.6 REENTER after program exit

     The REENTER command should be used to restart the program
     and SIMDDT after program exit.  Note that all breakpoint
     settings will be removed.  If SIMDDT was not loaded at
     execution start, the START command will restart the program
     without invoking SIMDDT.
DECsystem-10 SIMULA Language Handbook, part II            Page 67
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


9.2  SIMDDT INPUT AND OUTPUT


     The user TTY is used for input to SIMDDT.  An "*" on the
     terminal signals that SIMDDT is expecting a user command.

     A maximum of 135 characters are allowed in the input command
     which is terminated by a break character (e.g.  carriage
     return, line feed).


     At entry to SIMDDT one of the following messages will be
     given:

     SIMDDT STARTED
     *
              SIMDDT and SIMRTS have been initialized but
              user program execution has not started.
              Breakpoints can be set before starting the
              program with the PROCEED command.


     AT <LINE> .....
              Breakpoint instruction executed, no STOP specified.


     STOP AT <LINE> .....
     *
              Breakpoint instruction executed and STOP specified.


     SIMDDT ENTERED , PROGRAM INTERRUPTED AT <LINE>
     *
              Program was probably interrupted via ↑C and
              REENTERed or the CONTINUE command was issued after
              program exit.


     ?ERROR IN JOB <N> AT <LINE>
     ZYQnnn ......
     *
              The error ZYQnnn was found.  


     <LINE> is a reference to a line number in the source program
     or an octal address, see below.

     The user TTY is used for output from SIMDDT when it is in
     debug mode and no USE command has been given.

     Both the user TTY and the SYSOUT file are used for output
DECsystem-10 SIMULA Language Handbook, part II            Page 68
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


     from SIMDDT when it is in error mode.  The output from the
     ALL command is only written to SYSOUT but all other output
     is written on both files.
     If an output file is specified with the USE command it
     replaces the SYSOUT file.

     The ↑O monitor command can be used to suppress output from
     SIMDDT.  The output will be resumed when a new command is
     expected and SIMDDT outputs the "*".

     The format of the output from SIMDDT is briefly described in
     the command descriptions below.  Appendix H contains
     examples of SIMDDT output.
     Every address that points into the generated code for
     statements is output in the line number format
     <MODULE>:<NNNNN>, see below 9.3.1.  The line chosen by
     SIMDDT is the last line on which a statement starts with an
     address less than or equal to the referenced address.  If no
     line number table was generated during compilation (-I
     switch set) or if the address references an external FORTRAN
     procedure the format of the line identification is
     <MODULE>:O <oooooo> , where o is an octal digit.  When the
     address can not be linked to any line number table the
     address is output in octal format O <oooooo> .  This is the
     case for all addresses pointing to the dynamic area, into an
     external Macro 10 procedure, into the simulation routines
     and into the high segment.
DECsystem-10 SIMULA Language Handbook, part II            Page 69
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


9.3  SIMDDT COMMANDS


     SIMDDT operates in two modes, debug and error mode.  SIMDDT
     is in error mode when entered after a program error,
     otherwise it is in debug mode.


9.3.1 Command syntax


     SIMDDT will translate all lower case letters to upper case.
     The reserved words in the commands can be truncated to any
     number of characters as long as they are unique.  The
     keywords INPUT and STOP have also been given short forms
     namely I and ST.  A command may not occupy more than one
     line.

     A line starting with the character ; will be treated as a
     comment and ignored.

     One or more blank and/or TAB characters must be used as
     separator between adjacent identifiers or keywords.

     Meta symbols used in the syntax description below are:

     !     (logical or sign) separates alternative options
     []    (square brackets) enclose a group of options of which
           one or none may be selected
     ...   denotes an arbitrary repetition of the group enclosed
           by the preceding braces or square brackets.

     See also the ALGOL report [2] for an explanation of the meta
     language.


     The user identifies a breakpoint with a source program line
     number.  In the command descriptions below the notation
     <LINE> is used.  <LINE> has the form [<MODULE>:] <NNNNN>.

     <MODULE> is MAIN or the SIMULA name of a separately compiled
     procedure or class.  MAIN indicates the main program.  If
     <MODULE>:  is omitted, the current module is used by SIMDDT,
     that is MAIN at program start and later the module in which
     the current breakpoint is placed.

     <NNNNN> is a line number in the source program.  The line
     should contain the beginning of an executable statement.  If
     not found the first higher numbered line on which a
     statement starts will be chosen.
DECsystem-10 SIMULA Language Handbook, part II            Page 70
CHAPTER 9 DEBUGGING SIMULA PROGRAMS WITH SIMDDT


     In the commands the user references a source variable with
     the notation <IDENTIFICATION> or <IDENTIFICATION2>.

     <IDENTIFICATION> ::= <IDENTIFICATION1> !
                          <IDENTIFICATION>.<IDENTIFICATION1>

     <IDENTIFICATION1> ::= <IDENTIFIER> !
                           <ARRAY IDENTIFIER>(<SUBSCRIPT LIST>)

     <SUBSCRIPT LIST> ::= [-] <INTEGER> !
                          [-] <INTEGER>,<SUBSCRIPT LIST>

     <IDENTIFICATION2> ::= <IDENTIFICATION> !
                           [<IDENTIFICATION>.]<ARRAY IDENTIFIER>

     The <IDENTIFIER> must be a simple variable of type INTEGER,
     REAL, LONG REAL, BOOLEAN or CHARACTER or a simple object
     reference or TEXT type variable.  When the <IDENTIFIER> is a
     formal parameter called by name it is not handled by SIMDDT.
     A formal parameter with transmission mode by value or by
     reference will be treated like a declared variable.

     The brackets ( ) around the <SUBSCRIPT LIST> can be replaced
     by a pair of square brackets, e.g.  A[1,2].

     In the commands below the notation <STRING> is used.
     <STRING> is a string of characters enclosed in " .  The
     first 5 characters in the string are part of the message
     that SIMDDT outputs at the breakpoint.
DECsystem-10 SIMULA Language Handbook, part II            Page 71
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


9.3.2 Commands


     [STOP] AT <LINE> [,<N>] [<STRING>]

     SIMDDT ACTION:  Identifies a breakpoint and outputs a
     message every n:th time the referenced statement is
     executed.  If STOP is given execution is halted and new
     SIMDDT commands are accepted.  <N>, the loop counter, is an
     integer number.


     [STOP] AT <LINE> [<STRING>] [IFCHANGED] <IDENTIFICATION> [,
     <IDENTIFICATION> ]...

     SIMDDT ACTION:  Identifies a breakpoint.  If IFCHANGED is
     specified SIMDDT will output only changed variable values,
     otherwise the values are always given.  If IFCHANGED is
     specified the first time the breakpoint is reached, the
     value is compared to 0, FALSE, NOTEXT, NONE or CHAR(0),
     depending on its type.

     [STOP] AT <LINE> [<STRING>] IF <IDENTIFICATION> 
     <RELATION OPERATOR> <VALUE>

     SIMDDT ACTION:  Identifies a breakpoint.  SIMDDT will output
     the variable value if the relation is TRUE.
     The <RELATION OPERATOR> can be one of > >= < <= = \= == =/=
     GT GE LT LE EQ NE EQV IS IN.  The <VALUE> can be an
     <IDENTIFICATION>, TRUE, FALSE, NOTEXT, NONE, arithmetic
     constant, character constant, text value constant or CLASS
     identifier.
     The character " can never be part of an input text value
     constant.  Some special control characters can not be part
     of a character or text value constant, see 9.2.
     The arithmetic constant must be in the form of an <INTEGER
     ITEM> when the variable is integer and in the form of a
     <REAL ITEM> when it is a real or long real variable.  The
     de-editing procedures GETINT and GETREAL in the RTS system
     are used to get the value.


     REMOVE [ AT <LINE> ]

     SIMDDT ACTION:  Remove all breakpoint commands for a
     specific line or remove all breakpoints.


     [STOP] BREAKS

     SIMDDT ACTION:  List all breakpoint commands.  The input
DECsystem-10 SIMULA Language Handbook, part II            Page 72
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


     order is not kept.  If STOP is specified, SIMDDT will halt
     after each breakpoint command and give the user the
     possibility to remove it.  When all breakpoint commands for
     a line are removed the breakpoint is removed.  The BREAKS
     command can be used to check if it was possible to set a
     breakpoint at the line given in the user command since
     SIMDDT will change the line number if necessary.

     USER ACTION:  Type REMOVE to remove the last command listed
     or type an empty line (RETURN key) to keep the command.


     OUTPUT <IDENTIFICATION2> [,<IDENTIFICATION2>]...

     SIMDDT ACTION:  Output the values of the variables.

     For an <ARRAY IDENTIFIER> the following will be output:
     The name and the array bounds
     <SUBSCRIPT LIST> = value of element ( if not initial value)

     The editing procedure PUTINT is used to output an integer
     variable and the PUTREAL procedure is used for real and long
     real variables.  A real variable will be given with 8 and a
     long real variable with 16 significant digits.

     For a text variable the following will be output:
     Octal address of the dynamic area allocated to the text
     variable
     SUBTEXT STARTS AT POSITION= <N>     (only if subtext)
     LENGTH= <N>
     POS= <N>
     " plus all characters in the stripped text
     "       (only if the last character in text is not a blank)
     A character with RANK(character) < 32 will be replaced by ↑
     followed by a capital letter (octal 100 is added to the
     internal representation of the character) with the exception
     of the characters VT, HT, FF, LF and CR which are unchanged
     and a NULL character which is skipped.

     For a REF variable the following will be given:
     QUALIFICATION ERROR     (if error)
     Name of class referenced by variable
     Octal address of dynamic area referenced by variable
     TERMINATED or DETACHED <LINE> or <LINE> (if active class)
     where <LINE> is the reactivation point of the invoking
     block.

     For a character variable the character enclosed in quotes
     will be output if RANK(character) is >= 32 , otherwise the
     output will be CHAR <N>, where <N> is RANK(character),
     RANK(' ')=32.
DECsystem-10 SIMULA Language Handbook, part II            Page 73
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


     INPUT <IDENTIFICATION> <ASSIGNMENT OPERATOR> <VALUE>

     SIMDDT ACTION:  Changes the value of the referenced variable
     to the value given in the command.  The operators are := and
     :-.  See above for explanation of <VALUE>.  This command is
     not valid after an error as it is then not possible to
     continue user program execution.




     DISPLAY [<MODULE>:]<NNNNN> [-<NNNNN>]

     SIMDDT ACTION:  Output the indicated source program lines.
     If the source program file is not found the user must enter
     the correct file specification via the I/O dialogue.  The
     display file is closed at exit from SIMDDT.  If <MODULE>:
     is not given in the command and it is the first DISPLAY
     command since SIMDDT was entered, the current module is
     assumed otherwise the already opened source program file is
     read again.


     INSPECT <IDENTIFICATION1> !  /START !  /RETURN !  /RESET !
     /UP

     SIMDDT ACTION:  The point in the program, from which SIMDDT
     sees the variables, is moved.  This makes it possible to
     input and output variables, which are not visible from the
     block in which the program execution was interrupted.

     INSPECT <IDENTIFICATION1>
     SIMDDT will now see inside the CLASS object, to which the
     variable refers.  It must be an object reference (not NONE).

     INSPECT /START
     SIMDDT will again see from the place, where program
     execution was originally interrupted and SIMDDT entered.

     INSPECT /RETURN
     SIMDDT should be looking inside a procedure or an active
     CLASS.  /RETURN will make SIMDDT see from the point where
     the procedure was called or where the class was generated or
     called.

     INSPECT /RESET
     Go back to where SIMDDT was looking before the last INSPECT
     /RETURN command.  /RESET is equal to /START if no INSPECT
     /RETURN command has been given since SIMDDT was entered.
DECsystem-10 SIMULA Language Handbook, part II            Page 74
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


     INSPECT /UP
     Look directly at the statically enclosing block.  Not valid
     when SIMDDT is looking at a terminated class instance.


     PROCEED

     SIMDDT ACTION:  SIMDDT will either start program execution
     or continue processing at the point where it was
     interrupted.  PROCEED is not valid after an error.


     USE <FILE SPECIFICATION>

     SIMDDT ACTION:  SIMDDT output will be written on the file
     specified in the command.  All output that signals a user
     action is also output on TTY e.g.  the message "STOP AT
     MAIN:17 " will be output both at the TTY and the file at the
     breakpoint stop.  The file is not closed until a new USE
     command is given or at the end of execution.  The format of
     the <FILE SPECIFICATION> is the same as the one used for the
     other user files, see chapter 8.2.  USE TTY:  will reset
     SIMDDT output to the terminal.


     CHAIN

     SIMDDT ACTION:  Writes the dynamic operating chain starting
     with the current block.  Only procedures, class instances
     and inspected class instances are given.  The name of the
     block and its activation line are listed.  Note that no
     operating chain is given when the interruption address was
     not located in any line number table.


     VARIABLES

     SIMDDT ACTION:  The complete storage pool is scanned and all
     variables that are of a type treated by SIMDDT are listed
     together with the name of the dynamic block in which the
     variables are declared.  If possible the garbage collector
     routine (G.C.) will be called before the storage pool is
     investigated.  The G.C.  scans the pool and removes all
     dynamic blocks that are unreferenced and inactive.  To
     reduce output only variables which do not have their initial
     values are given.  The amount of data is often very large,
     and the USE command can be used to direct the output to a
     disk or LPT file.
DECsystem-10 SIMULA Language Handbook, part II            Page 75
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


     For each dynamic block instance the following will be
     output:
     The name of the dynamic block , that is the procedure or
     class name , MAIN if main program, PREFIXED BLOCK plus name
     of prefix class or BLOCK if unreduced block
     Octal address of the dynamic area
     TERMINATED or DETACHED <LINE> or <LINE> (if active)

     The format of the variables is found in the description of
     the OUTPUT command above.  For each array identifier the
     name and the array bounds are always given even if all
     elements have their initial values.


     NOARRAYS

     SIMDDT ACTION:  See above command VARIABLES.  The difference
     is that all ARRAY identifiers and their elements are skipped
     in the output.


     SCHEDULED

     SIMDDT ACTION:  For each scheduled process the following
     will be output:
     EVTIME= scheduled time
     Class name
     Octal address of dynamic area DETACHED <LINE>


     ALL

     SIMDDT ACTION:  Produces the same information as if the
     commands CHAIN, VARIABLES and SCHEDULED had been given.
     After an error the output is written on the SYSOUT file.


     EXIT

     SIMDDT ACTION:  Returns control to SIMRTS which closes all
     files and then returns to the monitor.  ↑C can be given to
     exit without closing any files.


     HELP

     SIMDDT ACTION:  Lists all SIMDDT commands.


DECsystem-10 SIMULA Language Handbook, part II            Page 76
CHAPTER 9 DEBUGGING SIMULA PROGRAMS , SIMDDT COMMANDS


9.3.3 Command examples


     STOP AT 55 ,3

     EXPLANATION:  Set a breakpoint at first statement on line 55
     and stop processing every third time the statement is
     executed so that the user can communicate with SIMDDT.

     AT MAIN:30 "LIST" VINT[1,3], VREF.VBOOL

     EXPLANATION:  Output the values of the variables VINT[1,3]
     and VREF.VBOOL each time the first statement on line 30 in
     the main program is to be executed.  The message will
     contain the letters "LIST".

     AT 10 IFCHANGED VREAL,VTEXT

     EXPLANATION:  Output the variable value if any of the
     variables were changed since the last time the statement at
     line 10 was to be executed.

     STOP AT 80 IF VREAL>=1.5

     EXPLANATION:  Stop execution at the statement on line 80 if
     the variable VREAL>=1.5

     OUTPUT VREF.VINTARRAY,VREALA[-1,7,7],VCHAR

     EXPLANATION:  Output all elements of the array
     VREF.VINTARRAY which are not zero, output the array element
     VREALA[-1,7,7] and the variable VCHAR.

     INPUT VTEXT:="TEXT VALUE ASSIGNMENT"

     EXPLANATION:  Change the value of the text variable.  Note
     that only the characters may be changed, but not the length.

     USE DEBFIL.LPT

     EXPLANATION:  SIMDDT output will be written on file
     DEBFIL.LPT.  Output in connection with a breakpoint stop
     will also appear on the user TTY.

     DISPLAY 1-10

     EXPLANATION:  Output the source program lines 1 to 10.


     Appendix H.9 contains additional SIMDDT examples.
DECsystem-10 SIMULA Language Handbook, part II            Page 77
Chapter 10 PROGRAMMING CONSIDERATIONS


10.  PROGRAMMING CONSIDERATIONS
     ==========================

10.1 WRITING EFFICIENT PROGRAMS


     This section contains some hints on how to write efficient
     programs in SIMULA.  Unless very high efficiency is
     required, however, good structuring and readability should
     always have the highest priority.  If the program is to be
     run at other installations, portability considerations are
     also important.  See 10.2.

     A programmer who writes less well structured programs to
     gain efficiency will often find that he did not gain the
     efficiency he intended.  The initial version may be
     efficient, but due to the bad structure, later changes and
     additions will be harder to make, and as a result the end
     product may be less efficient and probably less reliable
     than if the program had been well structured at the outset.

     If you desire efficiency, your efforts towards this goal
     ought to be guided by knowledge about which parts of your
     programs are expensive.  Use of performance measurements
     programs such as that described in appendix J may be a good
     help in gaining this knowledge.  When you know which parts
     of your programs are using much cpu time, core or other
     expensive resources, you will know where to apply rewriting
     or MACRO 10 procedures to minimize use of these resources.

     The following hints are not ordered by importance:

      -> Do not ignore warning messages issued by the compiler.
     Often, these messages point to possibly inefficient or
     dangerous coding sequences or features.

      -> Avoid unnecessary type conversions by declaring
     variables with appropriate types, and by avoiding mixed type
     expressions.  Note that the precision of certain arithmetic
     functions is governed by the precision of the argument,
     i.e. LONG REAL arguments cause the LONG REAL version to be
     called.  This may be inefficient in some cases where the
     greater precision is not necessary.

      -> In connection with the above, note also that the
     de-editing procedures GETREAL and INREAL always give LONG
     REAL results.  Copy the result to a REAL variable before
     using it in a REAL expression, if you want to avoid
     unnecessary conversions.

DECsystem-10 SIMULA Language Handbook, part II            Page 78
Chapter 10 PROGRAMMING CONSIDERATIONS


      -> In FOR statements, the STEP and UNTIL elements should be
     constants or simple variables.  Usually you do not want
     re-evaluation of these every time in the loop.  Avoid
     function designators, formal parameters by name, subscripted
     variables, variables of different type from the controlled
     variable, and general expressions.  The fastest loop is one
     with step +1 or -1 and a limit which is a simple constant or
     variable.  Use the WHILE statement where the full generality
     of the FOR statement is not needed.

      -> In most cases, it is best to avoid transmitting
     parameters by name if value or reference mode can be used.
     One case where name parameters may be necessary is when the
     values of some parameters are to be modified by a procedure.
     In this case, it often pays to copy the value on entry and
     copy the modified value back on return.  Access to simple
     variables corresponding to formal parameters by name is
     optimised, but it is still slower than accessing a local or
     global variable.  In this respect, value and reference mode
     parameters count as local variables in the procedure.  What
     is said above does not always apply for text parameters when
     you have to choose between name and value mode.  One reason
     for this is that value transmission of text parameters
     destroys the stack nature of the top of the data area, which
     makes memory allocation slower.  Another reason is that
     copying of long texts should be avoided.  See below about
     "memory allocation for procedures".

      -> Avoid long linear searches through large sets.  If
     possible, use hash coding or binary tree representations to
     reduce the search times.  Note that CARDINAL performs a
     linear search through the whole set on each call!

      -> If many attributes of a class are to be accessed, use
     inspection in order to save some code space and execution
     time.  As a guideline, use INSPECT when you have more than 4
     accesses to attributes of the same class.  However, program
     readability may often motivate deviations from this
     guideline.

      -> Avoid creating unnecessary blocks.  If a new temporary
     variable is required, declare it in an existing block rather
     than converting a compound statement into a block.

      -> Use EJECT and SPACING instead of outputting blank images
     on printfiles.  This is faster.

      -> Garbage collection time is reduced and the amount of
     core used is reduced if care is taken to avoid maintaining
     references to space-consuming data structures which are no
     longer needed.
DECsystem-10 SIMULA Language Handbook, part II            Page 79
Chapter 10 PROGRAMMING CONSIDERATIONS


     Examples:

     REF(HEAD) QUEUE;  ....building a large queue...  QUEUE:-
     NONE;  Comment when the set is no longer needed, this may
     save a lot of core and garbage collection time;

     TEXT MANUSCRIPT;  ...building a long text string...
     MANUSCRIPT:- NOTEXT;  Comment saves space when the
     manuscript is no longer needed;

     BEGIN REAL ARRAY MATRIX[100,100];
     ...use of the MATRIX ...
     END;  Comment saves space when the MATRIX is no longer
     needed;

      -> Memory allocation for procedures without VALUE-declared
     TEXT parameters is especially efficient.  However, this
     efficiency is lost if the procedure or any procedures called
     by it directly or indirectly create new text objects or
     class instances (NEW).

      -> Use built-in system procedures and classes where these
     suit your needs.  They are often considerably faster than if
     you write a corresponding procedure or even corresponding
     in-line code yourself.

     Example I:  "WHILE mytext.more DO" is faster than "n:=
     mytext.length;  FOR i:= 1 STEP 1 UNTIL n DO".

     Example II:  The built-in procedures LETTER and DIGIT
     provide a faster way of checking if a character is a letter
     or digit than using RANK and checking the integer values
     yourself.  Your program will also become less
     machine-dependent if you use LETTER and DIGIT.

      -> If you use DIRECTFILE, try to organize your programs to
     minimize the number of reads and writes.  This can be done
     by using hash-coding, keeping central tables in core, etc.

      -> If a program has been carefully tested both by the
     programmer and in production work for a long time, you may,
     if you dare, consider to set off some of the built in
     debugging aids, to save core and cpu time.  The following
     switches can be used (should be given in the COMPILE
     (EXECUTE etc.) command):

     -A  removes array bounds checking for arrays.  May save cpu
     time.
     -Q  removes qualification checking of reference assignments.
     May save cpu time.
     -I  removes the generation of line number tables for SIMDDT.
DECsystem-10 SIMULA Language Handbook, part II            Page 80
Chapter 10 PROGRAMMING CONSIDERATIONS


     Saves core.
     -D  removes the generation of symbol tables for SIMDDT.
     Saves core.


10.2 WRITING PORTABLE PROGRAMS


     Even if you do not now plan to move a program to another
     SIMULA system, such a need may arise in the future.  If
     portability is desirable, deviations from the Common Base
     language should be kept at a minimum, or at least be very
     clearly commented and set aside from the rest of the code.
     If external assembly or FORTRAN procedures are used, a
     SIMULA version should if possible be available for each of
     these in case of a move to a different installation.

     The following constructs of DECsystem-10 SIMULA should be
     avoided if you want portable programs:


      -> Any input procedure which is dependent on the line
     length of the input file.  Especially avoid input procedures
     requiring input lines longer than 72 or 80 characters.

      -> Use of multi-line text constants.

      -> Any output procedure which writes disk files with lines
     longer than 72 or 80 characters (132 characters for
     printfiles).

      -> Any use of the following Swedish characters in source
     program identifiers:  $, #, @, }, {, `.  These characters
     may however occur in TEXT and CHARACTER constants.

      -> Use of non-decimal constants.

      -> Use of lower case letters.

      -> Use of the characters whose decimal value is less than
     32 and the characters:
         !, [, ], ↑, }, | .
     Use alternative representations as follows:  NE for \=, NOT
     for \, COMMENT for !, () for [], ** for ↑.

      -> With DIRECTFILE, use of the procedure ENDFILE, reading
     of unwritten lines, writing past the end of the file.

     Some of the incompatibilities mentioned above will be
     removed automatically from your source programs if you
     convert them to IBM SIMULA using the SIMIBM program
DECsystem-10 SIMULA Language Handbook, part II            Page 81
Chapter 10 PROGRAMMING CONSIDERATIONS


     described in appendix N of this handbook.


10.3 MISCELLANEOUS ADVICE


      -> Use BREAKOUTIMAGE when communicating with a
     conversational terminal.  This permits the prompting
     question and the answer to be written on the same line.

      -> If the output from a program is directed to a
     conversational terminal (e.g. the user's tty), it may be
     inconvenient, especially with display terminals, to get the
     automatic new page after every 60 lines.  This can be
     circumvented by using an outfile instead of a printfile, or
     by coding LINESPERPAGE(-1) in your program.
     LINESPERPAGE(-1) effectively sets the page size to infinity.

DECsystem-10 SIMULA Language Handbook, part II            Page 82
APPENDIX A   HARDWARE REPRESENTATION


APPENDIX A   HARDWARE REPRESENTATION
====================================


A.1  SIMULA COMPILER INPUT.

     A DEC System 10 SIMULA program is a sequence of symbols from
     the DEC System 10 character set (ASCII 7 bit code) placed on
     a disk file (i.e.  an ordered set of data on a disk like
     device).  The data on the file is separated into lines.  A
     line is delimited by a vertical tab (VT), line feed (LF) or
     form feed (FF) character.  The maximum length of a line is
     135 characters.

     A SIMULA program consists of a sequence of basic symbols,
     identifiers, constants, comments and line editing
     characters.  The rules for these are given below.



A.2  SIMULA PROGRAMS ON CARDS.

     Existing SIMULA programs with card characteristics, 80
     characters per card with columns 73-80 for identification or
     sequence numbers can easily be processed by using either (i)
     the batch switch WIDTH or (ii) the PIP command switch E or
     (iii) the IBMSIM or CDCSIM program described in appendix M
     to remove columns 73-80.  The IBMSIM and CDCSIM program will
     also convert the character representation from IBM SIMULA or
     CDC SIMULA to DECsystem 10 SIMULA.



A.3  STANDARD LINE SEQUENCE NUMBERS.

     The rules for standard sequence numbers are specified in the
     LINED reference manual paragraph 7.0.  Those characters that
     belong to the sequence number (i.e.  padding NULL
     characters, the number itself and a trailing tab character)
     are not considered part of the input SIMULA program.
     However they will appear in the program listing and they are
     put in the line number table so that SIMDDT can use them.
     If no line numbers appear in the source code the SIMULA
     compiler will supply its own line numbers.  The handling of
     programs with partly numerical, partly blank line numbers is
     described in appendix K.
DECsystem-10 SIMULA Language Handbook, part II            Page 83
APPENDIX A   HARDWARE REPRESENTATION


Reference  DEC 10 SIMULA  Alternative    ASCII 7 bit   Comments
language   representation representation octal code
-----------------------------------------------------------------
   +           +                         053
   -           -                         055
   x           *                         052
   /           /                         057
"int. div."    //                        057 057
   ↑           ↑              **         136
   >           >              GT         076
"> or ="       >=             GE         076 075
   <           <              LT         074
"< or ="       <=             LE         074 075
   =           =              EQ         075
"not ="        \=             NE         134 075
   ==          ==                        075 075
   =/=         =/=                       075 057 075
   .           .                         056
   ,           ,                         054
   :           :                         072
   ;           ;                         073
"lowered ten"  &              &&         046     Lowered ten
   symbol
                                                 & in real
                                                 constants
                                                 && in long real
   (           (                         050
   )           )                         051
   [           [              (          133
   ]           ]              )          135
   :=          :=                        072 075
   :-          :-                        072 055
   '           '                         047     Character quote
   "           "                         042     Text quote
"not"          \              NOT        134
"space"        <space>                   040
"log. OR "     OR
"log. AND"     AND
"log. IMP"     IMP
"log. EQV"     EQV
COMMENT        COMMENT        !          041     ! is comment
                                                 symbol in
                                                 DEC 10 ALGOL
                                                 and FORTRAN but
                                                 not in standard
                                                 SIMULA
-----------------------------------------------------------------

   Table A.1   Special character representation in DEC 10 SIMULA.
               Non-printable reference language symbols
               are enclosed in double quotes.
DECsystem-10 SIMULA Language Handbook, part II            Page 84
APPENDIX A   HARDWARE REPRESENTATION


A.4  BASIC SYMBOLS.

     A basic symbol is represented as a keyword, a special
     character or a sequence of special characters.  The keywords
     are the standard SIMULA words plus GO, LONG, OPTIONS, SHORT,
     TO and the words listed in the table A.1 above (See Appendix
     G.).  A lower case letter can always be used instead of the
     corresponding upper case letter.



A.5  IDENTIFIERS.

     The first character in an identifier must be a letter.  The
     following characters must be letters, digits or underline
     characters.  A lower case letter can always be used instead
     of the corresponding upper case letter.  The first 12
     characters in an identifier are significant.  An identifier
     must not be a keyword (See Appendix G).  The character
     <underline> or <left arrow> (octal code 137) is accepted in
     identifiers but not as the first caracter.  Embedded blanks
     are not accepted.



A.6  CONSTANTS.

A.6.1  Arithmetic constants.

     Integer constants consist of a number of decimal digits.  If
     an integer constant is out of integer range it is regarded
     as a real constant.  The integer range is -2↑35 to 2↑35 - 1.
     ( 2↑35 = 34 359 738 368 ).
     An integer constant can be written in a different radix as
     follows:
     nRd
     where n is 2, 4, 8 or 16 and d represents a string of digits
     acceptable in the corresponding radix.  E.g.  octal number
     7711 is written 8R7711 and binary 10 is written 2R10.

     Real constants consist of a decimal number (containing
     either an integral part or a fractional part or both)
     followed by an optional exponent.  The fractional part has a
     range in magnitude of 1/2 to (1 - 2↑-27) with a precision of
     approximately 8 decimal digits.  The exponent consists of
     the lowered ten symbol & followed by an optionally signed
     integer.  The exponent range is -128 to 127 inclusive.  E.g.
     0.000000000123 could be written 1.23&-10.

     Long real constants must contain the exponent part with the
     lowered ten symbol &&.  The exponent range is the same as
DECsystem-10 SIMULA Language Handbook, part II            Page 85
APPENDIX A   HARDWARE REPRESENTATION


     for real constants.  The fractional part has a range in
     magnitude of 1/2 to (1 - 2↑-62) with a precision of
     approximately 19 decimal digits.  Long real constants should
     be used only if a precision greater than 8 decimal digits is
     needed.  E.g.  3.1415926535898 is written 3.1415926535898&&0
     to be represented in double precision.



A.6.2  Boolean constants.

     Boolean constants are the SIMULA words TRUE and FALSE.



A.6.3  Character constants.

     A character constant is any single printable character from
     the ASCII set, octal code 040-176, enclosed by the symbol '
     (octal code 047).  Other ASCII character values can be
     entered with the CHAR procedure, e.g.  CHAR(9) for <TAB>.



A.6.4  Text constants.

     A text constant is any sequence of printable ASCII
     characters, octal code 040-176, enclosed in double quote
     symbols " (octal code 042).  The double quote symbol in a
     text constant is written as two consecutive double quote
     symbols.  The line delimiting characters VT, CR, LF and FF
     are accepted but not treated as part of the text constant.
     Other ASCII character values can be entered with a
     combination of the PUTCHAR and CHAR procedures.



A.7  COMMENTS.

     A comment consists of the basic symbol COMMENT followed by a
     nonalphameric character and the successive characters up to
     and including the next semicolon.  The symbol COMMENT may be
     replaced by the character !  (octal code 041).  All
     printable characters plus the line editing characters are
     allowed in comments.

     An END comment is the string of characters following the
     basic symbol END up to but not including the next semicolon,
     END, ELSE, WHEN or OTHERWISE.

     Comments and END comments are printed in the program
DECsystem-10 SIMULA Language Handbook, part II            Page 86
APPENDIX A   HARDWARE REPRESENTATION


     listing, but they are not further processed by the compiler.

     A warning message is issued if an END comment contains the
     basic symbols ":=" , ":-" , "(" or "GOTO".



A.8  USE OF SPACES AND LINE EDITING CHARACTERS.

     A basic symbol, identifier or constant must not contain line
     editing characters or non-significant spaces.
     Exceptions are:
     1) GOTO can be written with or without spaces and
        line editing characters between GO and TO.
     2) Arithmetic constants may contain spaces.

     Adjacent identifiers or basic symbols represented by
     keywords must be separated by one or more spaces and/or line
     editing characters.  The same rule applies to a keyword
     followed or preceded by a number constant.  Any basic
     symbol, identifier or constant must be contained in one
     line.  A text constant may, however, continue over several
     lines.
DECsystem-10 SIMULA Language Handbook, part II            Page 87
APPENDIX B   INTERNAL REPRESENTATION


APPENDIX B   INTERNAL REPRESENTATION
====================================



     The DECsystem-10 SIMULA Technical Documentation should be
     consulted when the information in this appendix is
     insufficient.



B.1  REPRESENTATION OF VARIABLES


     INTEGER
     -------

     One word.  Twos complement fixed point hardware format.


     SHORT INTEGER
     -------------

     Treated as INTEGER.


     REAL
     ----

     One word.  Single precision floating point hardware format.


     LONG REAL
     ---------

     Two words.  Double precision floating point hardware format.


     CHARACTER
     ---------

     One word.  The rightmost 7 bits contain the character.  The
     rest of the word is zero.


     BOOLEAN
     -------

     One word.  TRUE is represented by -1.  FALSE is represented
     by 0.
DECsystem-10 SIMULA Language Handbook, part II            Page 88
APPENDIX B   INTERNAL REPRESENTATION


     REF
     ---

     One word.  Left halfword is zero.  Right halfword points at
     an object or is NONE.  NONE is represented by octal 676000
     (223K).


     TEXT
     ----

     Two words.              ---------------------
                     0       [   SP    I   ZTE   ]
                             ----------+----------
                     1       [   LNG   I   CP    ]
                             ---------------------

     SP   0<0:17>    The number of characters before this
                     (sub)text within the text object.
     ZTE  0<18:35>   Pointer to the text record.
     LNG  1<0:17>    Length of TEXT.
     CP   1<18:35>   Current position in text (= POS-1)

     Text record:
                             ---------------------
                     0       [     Overhead      ]
                             ----------+----------
                     1       [   CLN   I   LEN   ]
                             ----------+----------
                     2       [    Characters     ]
                             .    of text        .
                             [                   ]
                             ---------------------

     Overhead        One word with information and workspace for
                     the garbage collector.
     CLN  1<0:17>    Number of characters in text as given in
                     parameter to BLANKS or COPY.
     LEN  1<18:35>   The length of the record in words
DECsystem-10 SIMULA Language Handbook, part II            Page 89
APPENDIX B   INTERNAL REPRESENTATION


     ARRAY
     -----

     One word.  Left halfword is zero.  Right halfword points to
     an array record.

     Array record:
                             ---------------------------------
                     0       [           Overhead            ]
                             ----------------+----------------
                     1       [               I      LEN      ]
                             ----------------+----------------
                     2       [              BAD              ]
                             --------+-------+----------------
                     3       [  TYP  I  SUB  I      ZPR      ]
                             --------+-------+----------------
                     4       [             LOW(1)            ]
                             ---------------------------------
                     5       [             UPP(1)            ]
                             .                               .
                     2n+2    [             LOW(n)            ]
                             ---------------------------------
                     2n+3    [             UPP(n)            ]
                             ---------------------------------
                     2n+4    [             DOP(2)            ]
                             .                               .
                     3n+2    [             DOP(n)            ]
                             ---------------------------------
                     3n+3    [                               ]
                             .       Array  elements         .
                             [                               ]
                             ---------------------------------

     Overhead        One word with information and workspace for
                     the garbage collector.
     LEN  1<18:35>   Total length of array record.
     BAD  2<0:35>    Address of the (possibly fictive) array
                     element with all subscripts zero.
     TYP  3<0:8>     Type of the elements in the array.
     SUB  3<9:17>    Number of subscripts.
     ZPR  3<18:35>   Qualification prototype pointer if REF
                     array.
     LOW[1:SUB]      Lower subscript bounds.
     UPP[1:SUB]      Upper subscript bounds.
     DOP[2:SUB]      Dope vector.
DECsystem-10 SIMULA Language Handbook, part II            Page 90
APPENDIX B   INTERNAL REPRESENTATION


B.2  REPRESENTATION OF DYNAMIC ADDRESSES


     DYNAMIC ADDRESS OF VALUE TYPE VARIABLE

                             ----------------+----------------
                             [      OFS      I      ZBI      ]
                             ----------------+----------------

             OFS     Offset of variable in block instance.
             ZBI     Block instance address.


     DYNAMIC ADDRESS OF SWITCH

                             ----------------+----------------
                             [      ZSR      I      ZBI      ]
                             ----------------+----------------

             ZSR     Switch record address.
             ZBI     Block instance address (static environment).


     DYNAMIC ADDRESS OF LABEL

                             ----------------+----------------
                             [      CAD      I      ZBI      ]
                             ----------------+----------------
                             [      EBL      I      BNM      ]
                             ----------------+----------------

             CAD     Code address.
             ZBI     Block instance address.
             EBL     Effective block level.
             BNM     State (block number).


     DYNAMIC ADDRESS OF ARRAY

                             ---------------------------------
                             [              ZAR              ]
                             ---------------------------------

             ZAR     Address of array record.
DECsystem-10 SIMULA Language Handbook, part II            Page 91
APPENDIX B   INTERNAL REPRESENTATION


     DYNAMIC ADDRESS OF REF ARRAY

                             ---------------------------------
                             [              ZAR              ]
                             ---------------------------------
                             [              ZPR              ]
                             ---------------------------------

             ZAR     Address of array record.
             ZPR     Qualification prototype address.


     DYNAMIC ADDRESS OF REF VARIABLE

                             ----------------+----------------
                             [      OFS      I      ZBI      ]
                             ----------------+----------------
                             [              ZPR              ]
                             ---------------------------------

             OFS     Offset in block instance.
             ZBI     Block instance
             ZPR     Qualification prototype address.


     DYNAMIC ADDRESS OF PROCEDURE

                             ----------------+----------------
                             [      ZPR      I      ZBI      ]
                             ----------------+----------------
                             [               I      EBI      ]
                             ----------------+----------------

             ZPR     Procedure prototype address.
             ZBI     Enclosing "complete" block (with display).
             EBI     Innermost enclosing block.
DECsystem-10 SIMULA Language Handbook, part II            Page 92
APPENDIX B   INTERNAL REPRESENTATION


B.3  REPRESENTATION OF PARAMETERS


     VALUE TYPE (integer, (long)real, boolean or character)
     CALLED BY VALUE.
     OBJECT REF CALLED BY REFERENCE.
     TEXT OR ANY TYPE OF ARRAY CALLED BY VALUE OR REFERENCE.

     They have the same representation as the corresponding
     variables.


     LABEL,SWITCH AND PROCEDURE CALLED BY REFERENCE

     They are represented by their dynamic addresses.


     ALL PARAMETERS CALLED BY NAME

     Parameters called by name are represented by a double-word
     descriptor with the following fields:

     NTH  0<0>       This field is =1 if no thunk exists, i.e.
                     if all information about the actual
                     parameter is contained in the descriptor.
     ATP  0<1:5>     Type code for actual parameter.
     DTP  0<6:8>     Type of descriptor and thunk.
                     VALUE   EXPLANATION
                     0   Actual parameter is a simple variable.
                         Its address is obtained by adding ZBI
                         and ADR.
                     1   Not used.
                     2   Not used.
                     3   The thunk will yield a dynamic address.
                     4   ADR is the address of a constant actual
                         parameter.
                     5   ADR is the value of a short (18-bit)
                         constant.
                     6   Not used.
                     7   The thunk yields the value of an
                         expression.
     AKD  0<9:11>    Gives the kind of the actual parameter.
     CNV  0<13>      Set to 1 if parameter conversion is
                     necessary.  i.e.  the type of the formal
                     parameter and the actual parameter are not
                     the same.
     FTP  0<14;17>   Type code for formal parameter.
DECsystem-10 SIMULA Language Handbook, part II            Page 93
APPENDIX B   INTERNAL REPRESENTATION


     ZBI  0<18:35>   Address of block instance where actual
                     parameter exists or address of nearest block
                     instance (with display) to be used when
                     evaluating the thunk.
     ZQU  1<0:17>    Qualifying prototype for actual parameter of
                     type REF.
     ADR  1<18:35>   If NTH is zero this is the address of the
                     thunk.  Otherwise the interpretation of this
                     field depends on the value of DTP as
                     follows:
                     DTP=0   Offset of variable in its block.
                     DTP=4   Address of a constant.
                     DTP=5   Value of constant.




B.4  DYNAMIC RECORDS


     DISPLAY RECORD

                             ---------------------------------
                             [           Overhead            ]
                             ----------------+----------------
                     -n-2    [      ZAC      I      LEN      ]
                             ---------------------------------
                     -n-1    [            ZPB(n)             ]
                             .                               .
                     -2      [            ZPB(1)             ]
                             ----------------+----------------
                     -1      [      ZBI      I      ARE      ]
                             ----------------+----------------

             Overhead One word with information and workspace for
                     the garbage collector.
             ZAC     Pointer to an accumulator stack record if
                     present.
             LEN     Length of the display record.
             ZPB[1:n] Display vector
             ZBI     Normally the block instance which was active
                     when this display record was created.
             ARE     Reactivation address of the block to which
                     this display belongs.
DECsystem-10 SIMULA Language Handbook, part II            Page 94
APPENDIX B   INTERNAL REPRESENTATION


     BLOCK INSTANCE HEADER

                             ---------------------------------
                     0       [           Overhead            ]
                             ----------------+----------------
                     1       [      BNM      I      ZPR      ]
                             ----------------+----------------

             Overhead One word with information and workspace for
                     the garbage collector.
             BNM     State of block instance (i.e.  the number of
                     the subblock currently active).
             ZPR     Prototype address


     UNREDUCED SUBBLOCK RECORD

                             ---------------------------------
                     0       [                               ]
                             .     block instance header     .
                     1       [                               ]
                             ---------------------------------
                     2       [                               ]
                             .     variables in subblock     .
                             [                               ]
                             ---------------------------------
     PROCEDURE INSTANCE

                             ---------------------------------
                             [                               ]
                             .       display record          .
                     -1      [                               ]
                             ---------------------------------
                     0       [                               ]
                             .     block instance header     .
                     1       [                               ]
                             ---------------------------------
                     2       [                               ]
                             .      formal parameters        .
                             [                               ]
                             ---------------------------------
                             [                               ]
                             .    variables of procedure     .
                             [                               ]
                             ---------------------------------
DECsystem-10 SIMULA Language Handbook, part II            Page 95
APPENDIX B   INTERNAL REPRESENTATION


     FUNCTION DESIGNATOR INSTANCE

                             ---------------------------------
                             [                               ]
                             .        display record         .
                     -1      [                               ]
                             ---------------------------------
                     0       [                               ]
                             .     block instance header     .
                     1       [                               ]
                             ---------------------------------
                     2       [       value of function       ]
                             .                               .
                             [       formal parameters       ]
                             ---------------------------------
                             [                               ]
                             .     variables of function     .
                             [                               ]
                             ---------------------------------


     CLASS INSTANCE

                             ---------------------------------
                             [                               ]
                             .         display record        .
                     -1      [                               ]
                             ---------------------------------
                     0       [                               ]
                             .     block instance header     .
                     1       [                               ]
                             ---------------------------------
                     2       [                               ]
                             .       formal parameters       .
                             [                               ]
                             ---------------------------------
                             [                               ]
                             .          attributes           .
                             [                               ]
                             ---------------------------------
DECsystem-10 SIMULA Language Handbook, part II            Page 96
APPENDIX B   INTERNAL REPRESENTATION


     SUBCLASS INSTANCE

                             ---------------------------------
                             [                               ]
                             .     prefix class instance     .
                             [                               ]
                             ---------------------------------
                             [                               ]
                             .       formal parameters       .
                             [                               ]
                             ---------------------------------
                             [                               ]
                             .           attributes          .
                             [                               ]
                             ---------------------------------


     PREFIX BLOCK INSTANCE

                             ---------------------------------
                             [                               ]
                             .     prefix class instance     .
                             [                               ]
                             ---------------------------------
                             [                               ]
                             .      variables of block       .
                             [                               ]
                             ---------------------------------



     EVENTNOTICE RECORD

                             ---------------------------------
                     0       [           Overhead            ]
                             ----------------+----------------
                     1       [               I       LEN     ]
                             ----------------+----------------
                     2       [       ZEV     I       ZER     ]
                             ----------------+----------------
                             [                               ]
                             .       Eventnotices            .
                             [                               ]
                             ---------------------------------

             Overhead One word with information and workspace for
                     the garbage collector.
             LEN     Length of the eventnotice rcord.
             ZEV     Eventnotice free chain start.
             ZER     Chain of eventnotice records.
DECsystem-10 SIMULA Language Handbook, part II            Page 97
APPENDIX B   INTERNAL REPRESENTATION


     EVENTNOTICE

                             ----------------+----------------
                     0       [       ZBL     I       ZPS     ]
                             ----------------+----------------
                     1       [       ZLL     I       ZRL     ]
                             ----------------+----------------
                     2       [       ZER     I       ZCH     ]
                             ----------------+----------------
                     3       [              TIM              ]
                             ---------------------------------

             ZBL     Backward link.
             ZPS     Process pointer.
             ZLL     Left link.
             ZRL     Right link.
             ZER     Base pointer (enclosing eventnotice record).
             ZCH     Free list pointer.
             TIM     Scheduled time.



     SIMULATION BLOCK

                             ---------------------------------
                     0       [                               ]
                             .       block instance header   .
                     1       [                               ]
                             ----------------+----------------
                     2       [       FT      I       LT      ]
                             ----------------+----------------
                     3       [       LNK     I       ZER     ]
                             ----------------+----------------
                     4       [              ZPS              ]
                             ---------------------------------

             FT      First eventnotice in SQS.
             LT      Last eventnotice in SQS and root of binary
                     tree.
             LNK     Chain of simulation blocks.  Used by garbage
                     collector.
             ZER     Chain of eventnotice records.
             ZPS     Ref(PROCESS) main program.
DECsystem-10 SIMULA Language Handbook, part II            Page 98
APPENDIX B   INTERNAL REPRESENTATION


     LINKAGE

                             ---------------------------------
                     0       [                               ]
                             .       block instance header   .
                     1       [                               ]
                             ----------------+----------------
                     2       [       SUC     I       PRE     ]
                             ----------------+----------------

             SUC     SUC link.
             PRE     PRED link.



     PROCESS

                             ---------------------------------
                     0       [                               ]
                             .            linkage            .
                     2       [                               ]
                             ---------------------------------
                     3       [              ZEV              ]
                             ---------------------------------

             ZEV     Eventnotice pointer.



     ORDER OF PARAMETERS

     The parameters will appear in the same order as they are
     named in the source program.


     ORDER OF ATTRIBUTES AND VARIABLES

     The attributes and variables are divided into three groups.
     In the first group are all which do not belong to another
     group.  In the second group are all of type TEXT and kind
     simple.  In the third group are all of type REF or kind
     ARRAY.  Within each group the attributes and variables have
     the same order as they are declared in the source program.  
DECsystem-10 SIMULA Language Handbook, part II            Page 99
APPENDIX C COMPILER DIAGNOSTICS


APPENDIX C  COMPILER DIAGNOSTICS
================================



     This appendix is divided into two sections.  The first
     section covers the diagnostic messages associated with
     commands and switches.  These messages are unnumbered.

     The second section contains all source code messages
     produced by the compiler.




C.1  COMMAND AND SWITCH MESSAGES




?= OR ← MISSING IN COMMAND

     EXPLANATION:  Equal sign or left arrow (=underline) is
     mandatory in all commands unless the command consists of
     only one source file descriptor.


?CAN'T OPEN DISK

     EXPLANATION:  OPEN failure when trying to open a disk
     device.

     COMPILER ACTION:  The compiler prints an asterisk and waits
     for next command.


CANNOT READ HELP FILE NOW

     EXPLANATION:  HELP switch must appear before the second
     source file descriptor, i.e.  it can follow relfil, lstfil
     or first source.  HELP may also appear alone in the command.

     COMPILER ACTION:  HELP ignored.


?COMMAND LINE EXCEEDS 135 CHARACTERS

     EXPLANATION:  Overflow in the internal command line buffer.

     COMPILER ACTION:  The input buffer is cleared, i.e.  all
     type ahead input is deleted.  The compiler prints an
DECsystem-10 SIMULA Language Handbook, part II           Page 100
APPENDIX C COMPILER DIAGNOSTICS


     asterisk and waits for next command.


COLON AFTER -E OR nE NOT ALLOWED.  LIST IGNORED

     COMPILER ACTION:  Switch is processed as /-E or /nE.


COLON AFTER switch NOT ALLOWED IN COMMAND.  CONSTANT IGNORED

     EXPLANATION:   Colon after PAGE and RUNSWITCHES only allowed
     in OPTIONS.


COLON AFTER SWITCH switch NOT SUCCEEDED BY QUOTE.  COLON IGNORED.

     COMPILER ACTION:  The switch is processed as if no colon was
     present.


?COMMA MISSING IN PPN

     USER ACTION:  Retype the command.


EXTERNAL SWITCH ALREADY SPECIFIED.  IGNORED

     EXPLANATION:  EXTERNAL switch can only be specified once for
     each compilation.


FINAL QUOTE IN TEXT CONSTANT MISSING.  QUOTE ASSUMED

     EXPLANATION:  Text constant after colon must be enclosed in
     quotes.


?HELP FILE NOT FOUND

     COMPILER ACTION:  HELP switch ignored.


?ILLEGAL DELIMITER "byte" IN COMMAND

     EXPLANATION:  Legal file specification delimiters are comma,
     equal sign, left arrow, space, tab and carriage return.

     USER ACTION:  Retype command.
DECsystem-10 SIMULA Language Handbook, part II           Page 101
APPENDIX C COMPILER DIAGNOSTICS


INCOMPLETE EXTERNAL LIST

     EXPLANATION:  Not valid EXTERNAL list format.  See Chapter
     3.5.


?INVALID DEVICE.  ONLY DSK ALLOWED

     EXPLANATION:  Device in command can only be disk or a
     logical name assigned to disk.

     USER ACTION:  Retype command.


KEYWORD (NO)CHECK EXPECTED AFTER CODE IN EXTERNAL LIST.  LIST
     IGNORED

     EXPLANATION:  CHECK, NOCHECK or -CHECK is expected after
     CODE in EXTERNAL list.

     COMPILER ACTION:  Switch is processed as /E.


KEYWORD FORTRAN, F40 OR CODE EXPECTED AFTER :  IN EXTERNAL LIST.
     LIST IGNORED

     COMPILER ACTION:  Switch is processed as /E.


?LOOKUP ERROR ON COMMAND FILE

     EXPLANATION:  Command file from COMPILE not found.

     COMPILER ACTION:  The compiler prints an asterisk and waits
     for next command.


MINUS NOT VALID BEFORE switch.  MINUS IGNORED

     EXPLANATION:  Minus is not excepted before HELP and PAGE.


MISSPELLED SWITCH:  switch.  FIRST LETTER USED

     EXPLANATION:  First letter of switch matches existing switch
     name but not rest of switch.

     COMPILER ACTION:  The misspelling is ignored and the switch
     is processed according to the first letter.
DECsystem-10 SIMULA Language Handbook, part II           Page 102
APPENDIX C COMPILER DIAGNOSTICS


?MORE THAN 6 DIGITS IN PPN

     USER ACTION:  Retype the command.


UNRECOGNIZABLE SWITCH:  switch.  SWITCH IGNORED

     EXPLANATION:  First letter of switch name does not match any
     legal switch.


NUMBER BEFORE switch NOT VALID.  NUMBER IGNORED

     EXPLANATION:  Decimal number may only precede EXTERNAL AND
     PAGE.


NUMBER NOT VALID WITH MINUS IN switch.  NUMBER IGNORED

     EXPLANATION:  Number is not valid after minus sign in any
     switch.


?READ ERROR ON COMMAND FILE

     EXPLANATION:  Read error occurred when reading the command
     file from COMPIL.

     COMPILER ACTION:  The compiler types an asterisk and waits
     for next command from the user (see chapter 3.2).


READ ERROR ON HELP FILE

     COMPILER ACTION:  The rest of the help message is lost.  The
     compiler continues command processing.


?RIGHT PARENTHESIS MISSING AFTER SWITCH(ES)

     EXPLANATION:  Switches from the COMPIL CUSP must be enclosed
     in parentheses.

     USER ACTION:  Retype the command.


?RIGHT SQUARE BRACKET MISSING IN PPN

     USER ACTION:  Retype the command.
DECsystem-10 SIMULA Language Handbook, part II           Page 103
APPENDIX C COMPILER DIAGNOSTICS


SWITCH switch NOT VALID AFTER PROGRAM START.  SWITCH IGNORED

     EXPLANATION:  See chapter 3.5.


?SWITCH WITHOUT FILE SPEC.  SWITCH IGNORED.

     EXPLANATION:  All switches except HELP must be preceded by a
     file specification.

     USER ACTION:  Type a new command.


TEXT CONSTANT AFTER -R NOT ALLOWED.  TEXT CONSTANT IGNORED.

     COMPILER ACTION:  Switch processed as /-R.


WARNING:  NO SWITCH NAME

     EXPLANATION:  Slash is not followed by a switch name.

     COMPILER ACTION:  Slash ignored.
DECsystem-10 SIMULA Language Handbook, part II           Page 104
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


C.2  COMPILER SOURCE CODE DIAGNOSTICS


All compiler messages are numbered SIMnnn X, where nnn is an
identification number and X indicates type of error:

E  indicates error, generated code may or may not be executable
W  indicates warning, generated code is executable
T  indicates termination error, no relfil is generated

If a terminating error occurs, the list file may not be
generated.


The message is printed on the user's TTY and in the source
listing after the faulty line.  If the faulty statement covers
more than one line, the message is written after the last line.
The line number given in the message points at the start of the
faulty statement.


COMPILER SOURCE CODE DIAGNOSTICS:


SIM001 W MINUS NOT VALID IN AAAA , MINUS IGNORED

         EXPLANATION:  AAAA is a switch name.  Minus may not
         precede PAGE or HELP.


SIM002 W COLON AFTER AAAA NOT SUCCEEDED BY QUOTE, TEXT CONSTANT
         IGNORED

         EXPLANATION:  AAAA is a switch name.  A text constant
         after colon must be enclosed in quotes.


SIM003 W END QUOTE MISSING IN TEXT CONSTANT, QUOTE ASSUMED

         EXPLANATION:  A text constant argument to a switch must
         be enclosed in quotes.


SIM004 W COLON AFTER AAAA NOT ALLOWED IN COMMAND, CONSTANT
         IGNORED

         EXPLANATION:  AAAA is a switch name.  Colon indicates a
         switch argument and is only allowed for EXTERNAL, PAGE
         and RUNSWITCHES.
DECsystem-10 SIMULA Language Handbook, part II           Page 105
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM005 W HELP NOT VALID IN OPTIONS STATEMENT, IGNORED

         EXPLANATION:  HELP switch is always ignored in OPTIONS.


SIM006 W NUMBER IN AAAA NOT VALID, NUMBER IGNORED

         EXPLANATION:  AAAA is a switch name.  Number is allowed
         only before EXTERNAL and PAGE.


SIM007 W NOT RECOGNIZABLE SWITCH AAAA , SWITCH IGNORED

         EXPLANATION:  AAAA is a switch name.  First letter of
         switch did not match the beginning of any legal switch.


SIM010 W SWITCH:  AAAA MISSPELLED.

         EXPLANATION:  AAAA is a switch name.

         COMPILER ACTION:  Switch is processed according to first
         letter.


SIM011 W SWITCH AAAA NOT VALID AFTER PROGRAM START, SWITCH
         IGNORED

         EXPLANATION:  AAAA is a switch name.  See chapter 3.5.


SIM012 W NUMBER NOT VALID WITH MINUS IN AAAA , NUMBER IGNORED

         EXPLANATION:  AAAA is a switch name.


SIM013 W EXTERNAL SWITCH ALREADY SPECIFIED, IGNORED

         EXPLANATION:  EXTERNAL can only be specified once in
         each compilation.


SIM014 W CHECK EXPECTED AFTER AAAA IN EXTERNAL LIST, LIST IGNORED

         EXPLANATION:  AAAA is a keyword, CODE or FORTRAN.

         COMPILER ACTION:  Switch is processed as /E.


DECsystem-10 SIMULA Language Handbook, part II           Page 106
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM015 W EXTERNAL LIST INCOMPLETE

         EXPLANATION:  Illegal EXTERNAL list format.  See chapter
         3.5.


SIM016 W FORTRAN, F40 OR CODE EXPECTED AFTER :  IN EXTERNAL, LIST
         IGNORED

         COMPILER ACTION:  Switch is processed as /E.


SIM017 W COLON AFTER -E NOT ALLOWED, LIST IGNORED

         COMPILER ACTION:  Switch is processed as /-E or /nE.


SIM020 W TEXT CONSTANT AFTER -R NOT ALLOWED, TEXT CONSTANT
         IGNORED

         COMPILER ACTION:  Switch is processed as /-R.


SIM021 W INVALID DEVICE IN R-SWITCH, ONLY DSK ALLOWED

         EXPLANATION:  File specification in R-switch must have a
         DSK device.

         COMPILER ACTION:  Switch ignored.

         USER ACTION:  Change device to DSK, or, if a logical
         name is used, assign this name to DSK.


SIM022 W COMMA MISSING IN R-SWITCH

         EXPLANATION:  PPN in file specification in R-switch must
         contain comma.

         COMPILER ACTION:  Switch ignored.

         USER ACTION:  Correct PPN and re-compile.


SIM023 W RIGHT SQUARE BRACKET MISSING IN R-SWITCH

         EXPLANATION:  PPN in file specification must always be
         terminated with right square bracket ].

         USER ACTION:  Correct PPN and re-compile.
DECsystem-10 SIMULA Language Handbook, part II           Page 107
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM024 W MORE THAN SIX DIGITS IN PPN

         EXPLANATION:  PPN in file specification in R-switch
         contains more than 6 digits.

         COMPILER ACTION:  Switch ignored.

         USER ACTION:  Correct PPN and re-compile.


SIM031 W COMPILER HAS RENUMBERED LINE AAAA

         EXPLANATION:  AAAA = line number.

         COMPILER ACTION:  The line number is replaced by
         previous line number + 1 in the source code listing.

         USER ACTION:  Resequence the line numbers in the source
         file.  If you are using the SOS text editor, use the NP
         command to get consecutive line numbers throughout the
         file.  See also appendix K.2 (for SOS or EDITS) or K.3
         (for TECO).


SIM032 W LINE NUMBER EXCEEDS 65534

         EXPLANATION:  Line numbers exceeding 65534 will not
         affect the compilation, but later run-time errors will
         not indicate the correct line.  These line numbers
         cannot be used for debugging with SIMDDT.

         USER ACTION:  Alternative 1:  Resequence the source file
         with smaller line number increment.  See appendix K.2 or
         K.3.
         Alternative 2:  Divide large SIMULA source program file
         into separately compiled modules.  See chapter 4 of part
         I of the DECsystem-10 SIMULA Language Handbook.


SIM034 W OVERFLOW, INTEGER CONVERTED TO REAL

         EXPLANATION:  Integer constant larger than 2↑36 -1.


SIM035 W YOU MAY HAVE FORGOTTEN ;  AFTER END

         EXPLANATION:  One of the basic symbols:
              := :- ( GOTO
         has been found in an end comment.  The comment is
         terminated by:
              ;  END ELSE WHEN or OTHERWISE
DECsystem-10 SIMULA Language Handbook, part II           Page 108
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


         USER ACTION:  If error, correct it, if not, insert
         COMMENT after END.


SIM036 W END OF LINE IN TEXT CONSTANT

         EXPLANATION:  One of the characters LF CR FF or VT has
         been found in a text constant.

         COMPILER ACTION:  The character is skipped and not moved
         to the generated program.


SIM037 W PAGE STRING MISSING AFTER :  IN OPTIONS

         COMPILER ACTION:  The input is skipped until / or ;  is
         found.


SIM040 W PAGE STRING LONGER THAN 60 CHARACTERS

         EXPLANATION:  The maximum number of characters in a page
         switch string is 60.

         COMPILER ACTION:  The input is skipped until the next "
         or until a new line is found.


SIM041 W INVALID CHARACTER AAAA EXPECTED IN OPTIONS

         EXPLANATION:  The invalid character and the character
         which is expected are edited into the message.  One of
         the characters ( / ) ;  is expected.

         COMPILER ACTION:  The input is skipped until the next /
         or ;  is found.


SIM042 W SWITCH MISSING IN OPTIONS STATEMENT

         EXPLANATION:  No switch was found in an OPTIONS
         statement.


SIM043 W END OF FILE IN OPTIONS STATEMENT



DECsystem-10 SIMULA Language Handbook, part II           Page 109
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM044 W CHARACTER AFTER TEST NOT VALID

         EXPLANATION:  This message should not occur.  The test
         version of the compiler accepts ↑↑ as a control
         character which directs debug output.  The characters
         after ↑↑ are not valid and 0 is assumed.


SIM051 W ILLEGAL END OF PROGRAM

         EXPLANATION:  Program continues after last end.

         USER ACTION:  Check block structure.


SIM052 W ILLEGAL SWITCH SETTING



SIM053 W SHORT NOT FOLLOWED BY INTEGER

         COMPILER ACTION:  Treated as INTEGER.


SIM054 W LONG NOT FOLLOWED BY REAL

         COMPILER ACTION:  Treated as REAL.


SIM055 W LEFT BRACKET IN EXPRESSION



SIM061 E TOO LONG LINE

         EXPLANATION:  A source code line must not exceed 135
         characters including possible nulls.

         COMPILER ACTION:  The line is truncated to 135
         characters and compiled as if it were terminated with
         carriage return and line feed.


SIM063 E = MUST FOLLOW =/

         COMPILER ACTION:  =/= assumed.


DECsystem-10 SIMULA Language Handbook, part II           Page 110
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM064 E NONPRINTABLE CHARACTER

         COMPILER ACTION:  The character is ignored.

         USER ACTION:  Check the source input program.  


SIM065 E ILLEGAL CHARACTER AAAA

         EXPLANATION:  AAAA is the illegal cnaracter.

         COMPILER ACTION:  The character is treated as a blank.


SIM066 E GO NOT FOLLOWED BY TO

         COMPILER ACTION:  The single GO is treated as GO TO.


SIM067 E GO MISSING BEFORE TO

         COMPILER ACTION:  The TO is ignored.


SIM070 E EOF IN COMMENT

         EXPLANATION:  The ;  which closes the comment is not
         found before the end of the input file is found.


SIM071 E EOF IN TEXT CONSTANT

         EXPLANATION:  The " which closes the text constant is
         not found before the end of the input file is found.

         COMPILER ACTION:  Valid program parts are taken as part
         of the text constant if the " was forgotten.


SIM072 E CHARACTER QUOTE MISSING

         COMPILER ACTION:  The incomplete character constant is
         treated as a valid one.


SIM073 E LINE CONTROL CHARACTER IN CHARACTER CONSTANT

         EXPLANATION:  The TAB character (HT) and the line
         control characters LF,FF,VT and CR are not accepted as
         character constants.
DECsystem-10 SIMULA Language Handbook, part II           Page 111
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


         COMPILER ACTION:  The character is treated as a blank.

         USER ACTION:  Use the built-in procedure CHAR.


SIM074 E TAB IN TEXT CONSTANT

         EXPLANATION:  The horisontal tab character is not
         accepted in a text constant.

         COMPILER ACTION:  The tab is treated as a blank
         character.

         USER ACTION:  Use PUTCHAR(CHAR(9));.


SIM075 E TEXT CONSTANT LONGER THAN 2**15



SIM076 E MORE THAN ONE DECIMAL POINT

         COMPILER ACTION:  Extra decimal points in the real
         constant are ignored.


SIM077 E DIGIT MISSING AFTER DECIMAL POINT

         COMPILER ACTION:  A zero is assumed to follow the
         decimal point in the real constant.


SIM100 E NO DIGITS IN EXPONENT

         COMPILER ACTION:  The exponent is ignored.


SIM101 E FLOATING OVERFLOW

         COMPILER ACTION:  The real constant 1.7&38 is used
         instead.


SIM102 E FLOATING UNDERFLOW

         COMPILER ACTION:  The real constant 0 is used.


DECsystem-10 SIMULA Language Handbook, part II           Page 112
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM103 E INTEGER OVERFLOW IN RADIX CONSTANT

         COMPILER ACTION:  The integer constant 8R377777777777 is
         used.


SIM104 E DIGITS MISSING IN RADIX NUMBER

         EXPLANATION:  There are no digits (0-9 or A-F) after R
         in a radix constant.

         COMPILER ACTION:  The base is used as integer constant.


SIM105 E DIGIT AAAA NOT LESS THAN RADIX BASE

         EXPLANATION:  AAAA is the digit (0-9 or A-F) which is
         greater than the radix base.

         COMPILER ACTION:  The rest of the number is ignored.


SIM110 E ILLEGAL START OF PROGRAM

         COMPILER ACTION:  Scan until program start is found.


SIM111 E XXXX IS MISPLACED

         EXPLANATION:  XXXX = misplaced entity.

         COMPILER ACTION:  Skip rest of statement or declaration.


SIM112 E DECLARATION MUST BE FOLLOWED BY ;

         COMPILER ACTION:  ;  inserted.


SIM113 E MISSING END

         COMPILER ACTION:  An extra END is inserted.


SIM114 E XXXX IS ILLEGAL CLASS PREFIX

         EXPLANATION:  XXXX = prefix.

         COMPILER ACTION:  The class is treated as unprefixed.
DECsystem-10 SIMULA Language Handbook, part II           Page 113
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM115 E XXXX SPECIFICATION MUST PRECEDE TYPE SPECIFICATION

         EXPLANATION:  XXXX = value or name.

         COMPILER ACTION:  Specification ignored.

         USER ACTION:  Reorder specifications.


SIM116 E ILLEGAL CLASS SPECIFICATION



SIM117 E VIRTUAL MUST BE FOLLOWED BY :

         COMPILER ACTION:  :  is inserted.


SIM120 E ILLEGAL VIRTUAL SPECIFICATION

         COMPILER ACTION:  Specification ignored.


SIM121 E MISSING ;  AFTER INNER

         COMPILER ACTION:  ;  is inserted.


SIM122 E XXXX IS ILLEGAL CLASS/PROCEDURE NAME

         EXPLANATION:  XXXX = CLASS/PROCEDURE name.

         USER ACTION:  Check that name is not a reserved word.
         (See appendix G).


SIM123 E ILLEGAL VIRTUAL TYPE

         COMPILER ACTION:  Specification ignored.


SIM124 E MISSING IDENTIFIER LIST

         EXPLANATION:  No identifier follows <type>.


SIM125 E ERRONEOUS SWITCH DECLARATION

         COMPILER ACTION:  Declaration ignored.
DECsystem-10 SIMULA Language Handbook, part II           Page 114
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM126 E ILLEGAL REFERENCE TYPE

         EXPLANATION:  Syntax should be:
         REF(<CLASS-identifier>).

         COMPILER ACTION:  Declaration or specification ignored.


SIM127 E MORE THAN 10 DIMENSIONS



SIM130 E MISSING XXXX

         EXPLANATION:  XXXX = right parenthesis/bracket.

         COMPILER ACTION:  Missing symbol is inserted.


SIM131 E HOMELESS XXXX PART

         EXPLANATION:  XXXX = ELSE/WHEN/OTHERWISE.

         COMPILER ACTION:  Statement ignored.


SIM132 E STATEMENT BEFORE BEGIN NOT TERMINATED

         COMPILER ACTION:  ;  inserted before BEGIN.


SIM133 E CANNOT FIND THEN IN IF-STATEMENT

         COMPILER ACTION:  statement skipped.


SIM134 E IF-STATEMENT CANNOT BE PLACED DIRECTLY AFTER THEN

         COMPILER ACTION:  Enclose statement by BEGIN-END.

         USER ACTION:  Do the same.


SIM135 E FOR-, INSPECT- or WHILE-STATEMENT CANNOT BE PLACED
         BETWEEN THEN AND ELSE

         COMPILER ACTION:  Enclose statement by BEGIN-END.

         USER ACTION:  Do the same.
DECsystem-10 SIMULA Language Handbook, part II           Page 115
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM136 E INNER ILLEGALLY PLACED

         EXPLANATION:  Either INNER is not placed at the
         outermost block level in a class body, or several INNER
         statements occur in the same class body.

         COMPILER ACTION:  This INNER is skipped.


SIM137 E DECLARATION FOUND WHERE STATEMENT WAS EXPECTED

         USER ACTION:  Check that this is not caused by an error
         in a previous declaration.


SIM140 E MISSING FOR-LIST



SIM141 E MISSING DO IN FOR-STATEMENT

         COMPILER ACTION:  Statement ignored.


SIM142 E ILLEGAL CONTROLLED VARIABLE

         COMPILER ACTION:  Statement ignored.


SIM143 E MISSING CONNECTION BLOCK

         COMPILER ACTION:  Statement ignored.


SIM144 E ILLEGAL WHEN-CLAUSE

         EXPLANATION:  SYNTAX IS:  WHEN <CLASS-identifier> DO

         COMPILER ACTION:  Clause is ignored.


SIM145 E MISSING DO IN WHILE-STATEMENT

         COMPILER ACTION:  Statement ignored.


SIM146 E CANNOT FIND UNTIL

         COMPILER ACTION:  FOR list element skipped.
DECsystem-10 SIMULA Language Handbook, part II           Page 116
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM147 E XXXX MISSING IN CONDITIONAL EXPRESSION

         EXPLANATION:  XXXX = THEN/ELSE.


SIM150 E NOCHECK PROCEDURES MUST NOT HAVE ANY EXPLICIT FORMAL
         PARAMETERS



SIM151 E MISSING IDENTIFIER AFTER XXXX

         EXPLANATION:  XXXX = NEW/THIS/ .  /QUA.


SIM152 E CONDITIONAL EXPRESSION IS NOT ENCLOSED BY PARENTHESES

         COMPILER ACTION:  Parentheses assumed.


SIM153 E MISSING OPERAND



SIM154 E MISSING BINARY OPERATOR

         COMPILER ACTION:  Skip second operand.

         EXPLANATION:  Could be missing ;.


SIM155 E ILLEGAL EXTERNAL ITEM

         EXPLANATION:  Externals may only be CLASSes or
         PROCEDUREs.


SIM156 E ERROR IN EXTERNAL ITEM



SIM157 E BLOCK STACK OVERFLOW

         EXPLANATION:  Too deep nesting of blocks, PROCEDUREs,
         CLASSes and connections.

         USER ACTION:  Restructure program, for example by using
         recursive procedures instead of blocks within blocks.


DECsystem-10 SIMULA Language Handbook, part II           Page 117
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM160 E XXXX PREVIOUSLY SPECIFIED

         EXPLANATION:  XXXX = identifier.

         COMPILER ACTION:  Specification ignored.


SIM161 E XXXX SPECIFIED BUT IS NOT FORMAL PARAMETER

         EXPLANATION:  XXXX = identifier.


SIM162 E FORMAL PARAMETER XXXX NOT SPECIFIED

         EXPLANATION:  XXXX = identifier.

         COMPILER ACTION:  Mode of formal is set to default.


SIM163 E FORMAL PARAMETER XXXX ILLEGALLY SPECIFIED

         EXPLANATION:  XXXX = identifier.


SIM164 E XXXX HAS MORE THAN 255 FORMAL PARAMETERS

         EXPLANATION:  XXXX = identifier.


SIM165 E XXXX HAS MORE THAN 255 VIRTUALS

         EXPLANATION:  XXXX = identifier.


SIM166 E TOO LARGE BLOCK LENGTH



SIM167 E TOO MANY REDUCED SUBBLOCKS

         USER ACTION:  Divide large block at program, CLASS or
         PROCEDURE block level.


SIM170 E EXTERNAL MUST BE COPIED INTO MAIN

         EXPLANATION:  External declarations must not precede a
         main program.


DECsystem-10 SIMULA Language Handbook, part II           Page 118
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM171 E EXTERNAL MUST NOT BE COPIED INDIRECTLY

         EXPLANATION:  This external declaration must precede the
         start of an external CLASS or PROCEDURE.


SIM172 E EXTERNAL MUST NOT BE ATTRIBUTE



SIM173 E XXXX HAS ILLEGAL FORTRAN SPECIFICATION



SIM174 E PPN IN EXTERNAL IDENTIFIER NOT OCTAL DIGIT



SIM175 E PPN IN EXTERNAL IDENTIFIER MORE THAN SIX DIGITS



SIM177 E ENTRY NAME CONFLICT BETWEEN EXTERNALS XXXX AND XXXX

         EXPLANATION:  The externals have unfortunately been
         assigned the same entry point name by the compiler.

         USER ACTION:  Re-compile one of the externals after
         deleting the corresponding ATR-file.


SIM200 E EXTERNAL XXXX DECLARED TWICE

         EXPLANATION:  Externals must only be copied once into a
         main program.


SIM201 E DISPLAY SIZE OVERFLOW, TOO MANY BLOCK LEVELS

         EXPLANATION:  More than 30 block levels including FOR
         loops and inspection blocks.


SIM240 T ?INVALID DEVICE, ONLY DSK IS ALLOWED

         EXPLANATION:  See corresponding message in Appendix C.1.


DECsystem-10 SIMULA Language Handbook, part II           Page 119
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM241 T ?COMMA MISSING IN PPN

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM242 T ?RIGHT SQUARE BRACKET MISSING IN PPN

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM243 T ?MORE THAN 6 DIGITS IN PPN

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM244 T ?= OR  MISSING IN COMMAND

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM245 T ?RIGHT PARENTHESIS MISSING IN SWITCH EXPRESSION

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM246 T ?LOOKUP ERROR IN COMMAND FILE

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM247 T ?CANNOT OPEN DISK

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM251 T ?SWITCH WITHOUT FILE SPECIFICATION, SWITCH IGNORED

         EXPLANATION:  See corresponding message in Appendix C.1.


SIM252 T ?TOO MANY SOURCE FILES

         EXPLANATION:  This error may occur if the user tries to
         concatenate more than six small source files, the sum of
         which does not exceed 135 characters.

         COMPILER ACTION:  The compilation is terminated after
         the fifth file.
DECsystem-10 SIMULA Language Handbook, part II           Page 120
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM256 T ?FILE NOT FOUND - file.ext[p,pn]

         EXPLANATION:  Source or attribute file not found.

         COMPILER ACTION:  This is a terminating error.  No rel
         file is generated and the list file is only generated
         when a source file has been found.


SIM260 T ?CANNOT ENTER FILE *.TMP



SIM261 T ?INTERNAL I/O ERROR

         EXPLANATION:  Probable reasons are that another job on
         the same ppn has deleted the compiler TMP files or
         protected them, or that no space is available on DSK:.
         It could also be a system software or hardware error.


SIM264 T ?MORE THAN 3072 IDENTIFIERS

         USER ACTION:  Redeclare quantities where possible or
         split the program into separately compiled modules.


SIM265 T ?NO PROGRAM FOUND

         EXPLANATION:  Source file is not a SIMULA program.


SIM266 T ?NOT ENOUGH CORE PASS 1

         EXPLANATION:  Too many declarations found.

         USER ACTION:  Split into separetely compiled modules.


SIM267 T ?TYPE AND/OR KIND OF EXTERNAL XXXX DOES NOT MATCH

         USER ACTION:  Check if the correct ATR-file is used.


SIM270 T ?NAME OF EXTERNAL XXXX DOES NOT MATCH

         USER ACTION:  Check if the correct ATR-file is used.


DECsystem-10 SIMULA Language Handbook, part II           Page 121
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM271 T ?EXTERNAL XXXX COMPILED AT WRONG LEVEL, LEVEL SHOULD BE
         NNNN

         USER ACTION:  Re-compile EXTERNAL with value of /E
         switch as given in error message, or move declaration to
         another block level.


SIM274 T ?FIXUP TABLE OVERFLOW

         EXPLANATION:  Not more than 4096 fixups can be allocated
         in a module.

         USER ACTION:  Split the module into several separately
         compiled modules.


SIM301 W INTERMEDIATE QUANTITIES SAVED IN SLOW MEMORY, EXPRESSION
         SHOULD BE SIMPLIFIED



SIM303 W IMPLICIT ARITHMETIC CONVERSION

         EXPLANATION:  A conversion between types INTEGER and
         LONG REAL is performed by a relatively slow subroutine
         in order not to lose precision.


SIM304 W INTEGER BASE CONVERTED TO REAL BEFORE EXPONENTIATION

         EXPLANATION:  This conversion is made to avoid run-time
         overflow when the result is larger than 2↑35.  Integer
         precision may be lost if the base is larger than 134 258
         569.

         USER ACTION:  If you want to retain full integer
         precision then convert the base to LONG REAL before
         exponentiation.


SIM305 W IMPLICIT QUALIFICATION CHECK

         EXPLANATION:  Extra code has been emitted to check the
         qualification in a reference denotes statement or a
         parameter transmission.


DECsystem-10 SIMULA Language Handbook, part II           Page 122
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM306 W IDENTIFIER XXXX REDECLARED BY INSPECTION

         EXPLANATION:  By inspecting a class instance, the
         identifier XXXX now refers to an attribute of the
         inspected class instead of the quantity it refers to
         outside the inspection.  This may be unintentional and
         cause trouble.  Change name on one of the quantities.
         The names of class attributes should not be too short or
         too common, like I, J, X.


SIM307 W EXPRESSION OR CONVERSION AFTER UNTIL

         EXPLANATION:  The quantity after UNTIL must be evaluated
         once for each repetition.


SIM310 W STANDARD FUNCTION XXXX HAS ONLY SINGLE PRECISION

         EXPLANATION:  XXXX = function identifier.


SIM311 W CONNECTED LABEL OR SWITCH XXXX

         EXPLANATION:  The transfer to a connected label may
         cause unexpected effects.


SIM331 E QUALIFICATION XXXX IS NOT A CLASS

         EXPLANATION:  XXXX = identifier.


SIM332 E INVALID 2ND OPERAND KIND OF OPERATOR XXXX

         EXPLANATION:  XXXX = operator.


SIM333 E PREFIX XXXX IS NOT A CLASS

         EXPLANATION:  XXXX = identifier.


SIM334 E PREFIX XXXX IS NOT ON THIS LEVEL

         EXPLANATION:  XXXX = identifier.


DECsystem-10 SIMULA Language Handbook, part II           Page 123
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM335 E VIRTUAL MATCH TO XXXX HAS WRONG KIND

         EXPLANATION:  XXXX = identifier.


SIM336 E VIRTUAL MATCH TO XXXX HAS WRONG TYPE OR QUALIFICATION

         EXPLANATION:  XXXX = identifier.


SIM337 E INCORRECT NUMBER OF PARAMETERS TO XXXX

         EXPLANATION:  XXXX = identifier.


SIM340 E DOUBLE DECLARATION OF XXXX

         EXPLANATION:  XXXX = identifier.


SIM341 E INCORRECT NUMBER OF SUBSCRIPTS TO XXXX

         EXPLANATION:  XXXX = identifier.


SIM342 E IDENTIFIER AFTER XXXX IS NOT A CLASS

         EXPLANATION:  XXXX = operator.


SIM343 E OPERAND OF ACTIVATE OR REACTIVATE IS NOT PROCESS



SIM344 E CONTROLLED VARIABLE OF TYPE TEXT IS NOT PERMITTED



SIM345 E INVALID LEFT HAND SIDE EXPRESSION TO OPERATOR XXXX

         EXPLANATION:  XXXX = :- or :=.


SIM346 E CONTROLLED VARIABLE XXXX IS OF NAME MODE

         EXPLANATION:  XXXX = identifier.


DECsystem-10 SIMULA Language Handbook, part II           Page 124
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM347 E STANDARD FUNCTION OR PROCEDURE XXXX CANNOT BE PASSED AS
         AN ACTUAL PARAMETER

         EXPLANATION:  XXXX = identifier.


SIM350 E NON-ARITHMETIC SUBSCRIPT TO ARRAY XXXX

         EXPLANATION:  XXXX = ARRAY identifier.


SIM351 E PARAMETERS OR SUBSCRIPTS TO XXXX OMITTED

         EXPLANATION:  XXXX = identifier.


SIM352 E THIS XXXX IS NOT A VALID LOCAL OBJECT, CLASS HAS BEEN
         USED AS BLOCK PREFIX

         EXPLANATION:  XXXX = identifier.


SIM353 E THIS XXXX IS NOT A VALID LOCAL OBJECT, NO ENCLOSING
         INSTANCE

         EXPLANATION:  XXXX = identifier.


SIM354 E BRACKETS AFTER XXXX SHOULD BE PARENTHESES

         EXPLANATION:  The identifier XXXX is a function or
         PROCEDURE, not a SWITCH or an ARRAY.


SIM355 E SIMPLE QUANTITY XXXX IS USED AS ARRAY, FUNCTION OR
         SWITCH

         EXPLANATION:  XXXX = identifier.


SIM356 E RESULT OVERFLOW OR DIVISION BY ZERO IN CONSTANT
         EXPRESSION



SIM357 E INCOMPATIBLE OPERAND TYPES OF OPERATOR XXXX

         EXPLANATION:  XXXX = operator.


DECsystem-10 SIMULA Language Handbook, part II           Page 125
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM360 E INVALID OPERAND TYPE OF OPERATOR XXXX

         EXPLANATION:  XXXX = operator.


SIM361 E INVALID REMOTE ACCESS, CLASS XXXX HAS LOCAL CLASS
         ATTRIBUTES

         EXPLANATION:  XXXX = identifier.


SIM362 E IDENTIFIER XXXX IS NOT DECLARED

         EXPLANATION:  XXXX = identifier.


SIM363 E INCOMPATIBLE QUALIFICATIONS XXXX AND XXXX TO OPERATOR
         XXXX

         EXPLANATION:  XXXX = identifier,identifier and operator,
         respectively.


SIM364 E OPERAND OF UNTIL IS NOT SIMPLE



SIM365 E INVALID OPERAND KIND OF OPERATOR XXXX

         EXPLANATION:  XXXX = operator.


SIM366 E TEXT CONSTANT IS NOT A VALID ACTUAL PARAMETER FOR
         REFERENCE MODE FORMAL XXXX OF XXXX

         EXPLANATION:  XXXX = identifier,identifier.

         USER ACTION:  Declare the formal parameter as NAME (if
         only used a few times) or VALUE (if used many times).


SIM367 E INVALID ACTUAL PARAMETER KIND CORRESPONDING TO FORMAL
         PARAMETER XXXX OF XXXX

         EXPLANATION:  XXXX = identifier.


DECsystem-10 SIMULA Language Handbook, part II           Page 126
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM370 E INVALID ACTUAL PARAMETER TYPE CORRESPONDING TO FORMAL
         PARAMETER XXXX OF XXXX

         EXPLANATION:  XXXX = identifier,identifier.

SIM371 E EXPRESSION IS NOT A VALID STATEMENT

         EXPLANATION:  The expression is not a procedure call or
         an object generator, which are the only expressions
         allowed at statement level.


SIM372 E BLOCK TOO LARGE



SIM373 E EXPRESSION TOO COMPLICATED



SIM374 E CANNOT SAVE INTERMEDIATE QUANTITIES, EXPRESSION TOO
         COMPLICATED



SIM375 E DETACH NOT ON OUTERMOST LEVEL IN CLASS



SIM376 E OPERAND SUCCEEDING BEFORE/AFTER NOT QUALIFIED AS PROCESS



SIM377 E CHAR PARAMETER ERROR

         EXPLANATION:  The parameter is a constant outside the
         range [0,127].


SIM400 E PREFIX XXXX TO XXXX IS NOT PREVIOUSLY DECLARED OR IS
         REDEFINED LATER

         EXPLANATION:  A prefix CLASS must be declared before its
         subclass.


SIM401 E INVALID REMOTE ACCESS, XXXX IS NOT AN ATTRIBUTE OF XXXX

         EXPLANATION:  The attribute XXXX does not exist in the
         CLASS qualifying the expression before the dot.
DECsystem-10 SIMULA Language Handbook, part II           Page 127
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM402 E INCOMPATIBLE QUALIFICATION OF PARAMETER CORRESPONDING TO
         FORMAL XXXX OF XXXX

         EXPLANATION:  XXXX = identifier,identifier.


SIM403 E INVALID ACTUAL PARAMETER MODE CORRESPONDING TO FORMAL
         PARAMETER XXXX OF XXXX

         EXPLANATION:  A name mode parameter must not be passed
         to random drawing procedures or ACCUM as a parameter on
         which side effects may occur.


SIM404 E ILLEGAL EXPRESSION AS ACTUAL PARAMETER CORRESPONDING TO
         FORMAL PARAMETER XXXX OF XXXX

         EXPLANATION:  XXXX = identifier,identifier.


SIM405 E PREFIX CLASS HAS LOCAL OBJECT



SIM406 E CONSTANT BEFORE DOT



SIM407 E INVALID ACCESS OF EXTERNAL XXXX FROM XXXX

         EXPLANATION:  Either the first EXTERNAL is invisible,
         not declared or mixed with another EXTERNAL with the
         same name, or the second EXTERNAL needs re-compilation.


SIM410 E CONNECTED PREFIX



SIM411 E CONNECTED QUANTITY HAS NO QUALIFICATION



SIM412 E DISPLAY SIZE OVERFLOW, TOO MANY LEVELS OR PARAMETER
         NESTINGS

         EXPLANATION:  More than 30 block levels including FOR
         loops, inspection blocks and thunk save areas used for
         certain parameters passed by name.
DECsystem-10 SIMULA Language Handbook, part II           Page 128
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM413 E TEXT STRING AFTER DENOTES



SIM414 E LOCAL QUANTITY IN ARRAY DECLARATION



SIM415 E PROGRAM TOO LARGE, CAPACITY LIMIT EXCEEDED

         EXPLANATION:  At least one of the five code streams
         generated in PASS 2 exceeds 100000 words (octal).

         USER ACTION:  Try separate compilation!


SIM416 E TOO MANY ACCUMULATORS, NNNN NEEDED FOR PARAMETERS

         EXPLANATION:  A "QUICK" MACRO-10 procedure requires its
         parameters in consecutive accumulators.  Only 10
         accumulators are available for this purpose.

         USER ACTION:  Do not use name mode unnecessarily.  Two
         ac's are required for each name mode parameter.  Place
         more information in some parameters.


SIM417 E TOO COMPLICATED ACTUAL PARAMETER CORRESPONDING TO FORMAL
         PARAMETER XXXX OF "QUICK" PROCEDURE XXXX

         EXPLANATION:  The actual parameter corresponding to a
         name mode formal parameter of a "QUICK" procedure may
         not have a thunk, which means that expressions,
         procedures, labels and switches are disallowed.  Note
         that this only applies to name mode.

         USER ACTION:  Compute the expression, if possible, to a
         variable and pass this instead.  Otherwise change the
         specifications of the procedure.  Note that "CODE" (not
         "QUICK") procedures permit any valid parameters
         according to the SIMULA definition, at the expense of
         the overhead incurred with a general procedure call.


SIM420 E ACTUAL/FORMAL TYPE MISMATCH FOR PARAMETER XXXX OF
         "QUICK" PROCEDURE XXXX

         EXPLANATION:  In name mode, the type of an actual
         parameter to a "QUICK" procedure must be identical to
         the formal type.
DECsystem-10 SIMULA Language Handbook, part II           Page 129
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


         USER ACTION:  Copy the actual parameter to a variable
         with the correct type and use the variable as parameter.
         If side effects are wanted, copy back the value after
         the call.


SIM461 T ?STACK OVERFLOW, STATEMENT TOO COMPLICATED



SIM462 T ?CORE FAILURE, PROGRAM HAS TOO MANY DECLARATIONS AND
         INSPECTIONS FOR THE AVAILABLE MEMORY

         USER ACTION:  Split the program into separately compiled
         modules.


SIM467 T ?STACK UNDERFLOW



SIM530 E INTERNAL ERROR:  NON-EXISTENT ERROR NUMBER

         EXPLANATION:  Error should never occur.

         USER ACTION:  Call a systems programmer.


SIM560 T ?NOT ENOUGH CORE PASS 3

         EXPLANATION:  Not enough core to create line number
         table for listing, cross reference listing or attribute
         file.


SIM561 T ?UNRECOVERABLE ERRORS

         EXPLANATION:  Too many severe errors of type termination
         have occurred.

         USER ACTION:  Contact a systems programmer.


SIM566 T ?INTERNAL ERROR:  STACK UNDERFLOW PASS AAAA

         EXPLANATION:  Same number in all three passes.  This
         message should never occur.  AAAA is pass number.

         USER ACTION:  Contact a systems programmer.
DECsystem-10 SIMULA Language Handbook, part II           Page 130
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM567 T ?  STACK OVERFLOW PASS AAAA

         EXPLANATION:  AAAA is pass number.  A capacity
         restriction has been violated.  Stack overflow pass 3 is
         often caused by too many BEGINs placed after each other
         without any closing ENDs.  The error may also be an
         internal error.

         USER ACTION:  See SIM157.


SIM570 T ?OPEN ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.


SIM571 T ?LOOKUP ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.


SIM572 T ?ENTER ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.


SIM573 T ?INPUT ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.
DECsystem-10 SIMULA Language Handbook, part II           Page 131
APPENDIX C.2 COMPILER SOURCE CODE DIAGNOSTICS


SIM574 T ?OUTPUT ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.


SIM575 T ?CLOSE ERROR ON FILE AAAA

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.


SIM576 T ?RENAME ERROR ON AAAA ERROR ON FILE

         EXPLANATION:  This may occur if the file is protected.
         AAAA is the name of the file.  This error may have
         occurred in any of the three passes.  The error may also
         be an internal compiler or system failure.

         USER ACTION:  Check protection and recompile program.



         END OF COMPILER SOURCE CODE DIAGNOSTICS 
DECsystem-10 SIMULA Language Handbook, part II           Page 132
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS
=========================================


D.1  DIALOGUE MESSAGES


     These messages are printed by the I/O subsystem of the RTS.
     Some of them start a dialogue with the user and some are
     only warnings.  A few messages also terminate execution.
     The messages are unnumbered.


?APPEND EXPECTED AFTER ACCESS

     EXPLANATION:  ACCESS switch must be followed by :APPEND

     RTS ACTION:  The user is asked in dialoque to enter a new
     file definition.


?CANNOT OPEN:  device

     EXPLANATION:  Device specified for SYSIN or SYSOUT not
     defined.

     USER ACTION:  Retype correct device.


?CANNOT OPEN DSK

     EXPLANATION:  OPEN failed for a disk-like device.

     RTS ACTION:  EXIT to monitor.


CANNOT DO INPUT FROM DEVICE:  devicename
CANNOT DO OUTPUT TO DEVICE:  devicename

     EXPLANATION:  Illegal file class type - device type
     combination.

     USER ACTION:  Retype correct device.


DECsystem-10 SIMULA Language Handbook, part II           Page 133
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


CANNOT SWITCH DEVICE AT THIS STAGE

     EXPLANATION:  This message is printed if the user tries to
     change a directory device (i.e.  DECtape or disk) after a
     LOOKUP or ENTER error.  It is only possible to switch
     between disk devices, e.g.  from DSKB to DSKD, or between
     DECtapes.

     USER ACTION:  Retype correct device.


?CLOSE ERROR ON:  filename

     EXPLANATION:  CLOSE error on specification file.

     RTS ACTION:  EXIT to monitor.


CLOSE ERROR ON SIMRTS.HLP

     RTS ACTION:  HELP switch ignored.


?CORE NOT AVAILABLE

     EXPLANATION:  RTS tried to allocate core according to the
     file definitions and switches in the specification file, but
     this core request could not be met by the monitor.

     RTS ACTION:  EXIT to monitor.


?DEVICE devicename ILLEGAL

     EXPLANATION:  Devicename does not exist.

     USER ACTION:  Retype correct device name.


FILE:  logicalname CLOSED AT TERMINATION

     EXPLANATION:  If the user omits the CLOSE statement for a
     file, the file will be closed at end of execution.

     RTS ACTION:  The file is closed normally.  This message is
     for information only.


DECsystem-10 SIMULA Language Handbook, part II           Page 134
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


?FILE filename NOT FOUND

     EXPLANATION:  LOOKUP failure on specification file.

     RTS ACTION:  RTS reads new file descriptor from TTY.

     USER ACTION:  Retype file descriptor.


HELP SWITCH MISPLACED.  IGNORED

     EXPLANATION:  The HELP switch is relevant only when file
     definitions are read from TTY.  HELP is also ignored in file
     parameters.


I SWITCH IGNORED.  FILE:  logicalname IS NOT DIRECTFILE

     EXPLANATION:  This is a warning message.  IMAGESIZE is
     relevant for directfiles only.


ILL DELIM AFTER LAST SWITCH

     EXPLANATION:  Valid delimiter after a run-time switch is
     either space or carriage return.

     RTS ACTION:  This is just a warning message.


?ILL DELIM AFTER LOGICAL NAME

     EXPLANATION:  Delimiter after logical name must be space,
     tab or carriage return.

     USER ACTION:  Retype file definition.


?ILLEGAL DELIMITER:  "byte" IN FILE DESCRIPTOR

     EXPLANATION:  Valid delimiters after a file descriptor are
     carriage return, space, tab or slash.

     USER ACTION:  Retype file definition.


DECsystem-10 SIMULA Language Handbook, part II           Page 135
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


?ILLEGAL PPN

     EXPLANATION:  Right square bracket missing or ppn contains a
     non-octal digit.

     USER ACTION:  Retype correct ppn.


?ILLEGAL PROTECTION CODE

     EXPLANATION:  Right angle bracket missing or protection code
     contains a non-octal digit.

     USER ACTION:  Retype correct protection code.


?ILL FILE DESC.  ENTER NEW FILE DESC

     EXPLANATION:  Illegal file descriptor was typed after LOOKUP
     or ENTER error.

     USER ACTION:  Retype correct file descriptor.


?ILL FILE DESCRIPTOR IN FILE PARAMETER

     EXPLANATION:  The file descriptor in the parameter to NEW
     ...FILE("...") is illegal.  This message is normally
     preceded by one or more messages specifying the error(s).

     USER ACTION:  Retype file class argument including logical
     name.


IND SPEC FILE NOT FOUND

     EXPLANATION:  LOOKUP error on indirect specification file.

     USER ACTION:  Retype file descriptor for indirect
     specification file.


L SWITCH IGNORED.  FILE:  logical name IS NOT AN OUTFILE OR
     PRINTFILE

     EXPLANATION:  LIMIT is not relevant for infile and
     directfile.


DECsystem-10 SIMULA Language Handbook, part II           Page 136
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


LOCAL SWITCH:  switch USED AS GLOBAL.  IGNORED


LOGICAL NAME:  logical name ALREADY DEFINED

     EXPLANATION:  This message is printed in connection with the
     SIMDDT USE command.  A USE file may not exist when the USE
     command is given.

     RTS ACTION:  Retype the USE command.


LOGICAL NAME:  logical name ALREADY DEFINED.  IGNORED

     EXPLANATION:  Logical names must be unique in the
     specification file.

     RTS ACTION:  The file definition is ignored.


LOOKUP FAILURE ON SIMRTS.HLP

     RTS ACTION:  HELP switch ignored.


?LOOKUP OR ENTER ERROR (nn) ON FILE:  logicalname

     EXPLANATION:  The code nn indicates the type of error.  The
     following codes are used:
     00  File not found
     01  User file directory does not exist on current file
         structure, usually incorrect ppn.
     02  Protection failure or directory full on DECtape
     03  File being modified
     14  Disk quota exceeded
     15  Write-lock error
     16  Not enough table space in monitor
     17  Partial allocation only.  The requested space allocation
         could not be met.
     21  Cannot supersede an existing directory
     23  Sub-directory not found.

     Other error codes usually indicate internal RTS error.

     USER ACTION:  Retype file descriptor (no logical name!)


DECsystem-10 SIMULA Language Handbook, part II           Page 137
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


NESTED IND FILES NOT ALLOWED.  IGNORED

     EXPLANATION:  An indirect specification file contains a
     specification file definition.


?NULL ARG AFTER SWITCH:  switch

     EXPLANATION:  Argument after colon is either 0 or missing.

     USER ACTION:  Retype the entire file definition.


ONLY DSK ALLOWED

     EXPLANATION:  Device can only be disk after retyping the
     definition of a specification file.

     RTS ACTION:  DSK assumed.


?PROJ NO NOT FOLLOWED BY COMMA

     USER ACTION:  Retype file definition.


?PROT CODE EXCEEDS THREE DIGITS

     USER ACTION:  Retype file definition.


?READ ERROR ON:  filename

     EXPLANATION:  Read error occurred on a specification file.

     RTS ACTION:  EXIT to monitor.


?READ ERROR ON SIMRTS.HLP

     RTS ACTION:  HELP switch ignored.


SPEC FILE STILL OPEN AS SYSIN.  LINE IGNORED

     EXPLANATION:  When SYSIN is used as indirect specification
     file, no more indirect files are allowed.


DECsystem-10 SIMULA Language Handbook, part II           Page 138
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


SWITCH:  switch MISSPELLED

     RTS ACTION:  Switch processed according to first letter.


SWITCH:  switch NOT FOLLOWED BY COLON

     EXPLANATION:  All run-time switches except HELP must be
     followed by colon and an argument.

     USER ACTION:  Retype file definition.


SWITCH:  switch NOT FOLLOWED BY DECIMAL NUMBER

     USER ACTION:  Retype file definition.


SWITCH:  switch NOT RECOGNIZED

     EXPLANATION:  First letter of the switch not a legal switch
     name.

     USER ACTION:  Retype file definition.


SYSIN ALREADY READ.  LINE IGNORED

     EXPLANATION:  File definitions can be read from SYSIN only
     once.


?TOO DEEP SFD NESTING

     EXPLANATION:  The maximum number of sub-file directories (an
     installation defined parameter) is exceeded.

     USER ACTION:  Retype the file definition.


?TTY END OF FILE OR TTY INPUT ERROR

     EXPLANATION:  The user has typed a ↑Z or an input error was
     detected.

     RTS ACTION:  EXIT to monitor, i.e.  ↑Z works as ↑C but the
     user cannot continue execution with the CONTINUE command.

     USER ACTION:  Use ↑C instead of ↑Z.  It is then possible to
     resume execution with the CONTINUE command.
DECsystem-10 SIMULA Language Handbook, part II           Page 139
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


WARNING:  APPEND MODE IGNORED FOR DIRECTFILE
WARNING:  APPEND MODE IGNORED FOR INFILE
WARNING:  APPEND MODE IGNORED FOR NON-DISK DEVICES

     EXPLANATION:  Append mode is valid only for printfiles and
     outfiles on disk.


WARNING:  DEVICE NOT DSK FOR DIRECTFILE.  DSK ASSUMED.

     EXPLANATION:   Device can only be disk for directfile.


WARNING:  DEVICE NOT DSK FOR SPECIFICATION FILE.  DSK ASSUMED.

     EXPLANATION:  Specification files can only be read from disk
     or TTY.

     RTS ACTION:  RTS tries to lookup the file on DSK.


WARNING:  FILES MUST BE A GLOBAL SWITCH.  FILES IGNORED


WARNING:  NO SWITCH NAME FOUND.  IGNORED

     EXPLANATION:  Slash is followed by slash, space, tab or
     carriage return.


WARNING:  PROJ OR PROG NUMBER TRUNCATED

     EXPLANATION:  Project or programmer number exceeds 6 digits.

     RTS ACTION:  Only the first 6 digits are used.


WARNING:  SFD IGNORED

     EXPLANATION:  Sub-file directories cannot be used for
     specification files.


WARNING:  SWITCHES IGNORED

     EXPLANATION:   Switches do not apply to definitions of a
     specification file.


DECsystem-10 SIMULA Language Handbook, part II           Page 140
APPENDIX D RUN-TIME AND DEBUG DIAGNOSTICS


WARNING:  TOO MANY BUFFERS FOR FILE:  logical name.  2 STANDARD
     BUFFERS ASSUMED

     EXPLANATION:  A value greater than 32 of the BUFFER switch
     argument is applicable to magnetic tape only.  
DECsystem-10 SIMULA Language Handbook, part II           Page 141
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


D.2 RUN-TIME AND DEBUG DIAGNOSTICS:


         EXPLANATION:
         The messages starting with ZYQ apply to the run time
         system (RTS), except for SIMDDT, which has its own
         messages starting with ZYD.  A few of the ZYQ messages
         may be issued by SIMDDT, with ZYQ changed to ZYD.  The
         RTS action on any of the ZYQ errors is to invoke SIMDDT
         in error mode.  SIMDDT prints the error message and
         indicates where the error occurred.  Commands can be
         entered to SIMDDT to find out more information about
         variables, state of execution etc.  By the EXIT command
         to SIMDDT, files are closed and the SIMULA program is
         terminated.  If you do not want to close files, exit via
         ↑C.


         In addition to the numbered messages, the following
         messages may appear on the TTY or the batch log:

%ZYQCRR Cannot REENTER recursively, continuing ...

         EXPLANATION:  REENTER was attempted while handling
         previous REENTER.


[ZYQCSH Cannot stop here]

         EXPLANATION:  REENTER was attempted at a point where
         SIMDDT cannot be called because data may not be
         consistent.

         USER ACTION:  Try again to stop and reenter.


%ZYQCUF CORE UUO failed.  Cannot load SIMDDT

         EXPLANATION:  The program is too big to allow for
         SIMDDT.


%ZYQEDO nn EDIT OVERFLOW(S)

         EXPLANATION:  In nn cases, the field width in an output
         editing operation, e g PUTREAL, was too small to hold
         the number.  Asterisks were edited into the field.

         USER ACTION:  Examine output fields for asterisks.
         Correct the program.
DECsystem-10 SIMULA Language Handbook, part II           Page 142
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


[ZYQEIR Error in routine:  XXXXXX]

         EXPLANATION:  An error has occurred in a subroutine such
         as SQRT taken from the FORTRAN library.  XXXXXX should
         be the name of the entry point of the routine.

         A subsequent ZYQ message issued by SIMDDT gives more
         information.  Some library routines have inline messages
         for errors.  Such a message will be typed following the
         above message.


%ZYQFLE <text>

         EXPLANATION:  An error has occurred in a subroutine such
         as SQRT taken from the FORTRAN library.  <text> is a
         string provided by the subroutine.  This message is
         preceded by a ZYQEIR message.


%ZYQIUF IN UUO failed.  Cannot load SIMDDT

         EXPLANATION:  Probably a DECsystem10 error.  Consult a
         systems programmer.


%ZYQLUF LOOKUP UUO failed.  Cannot load SIMDDT

         EXPLANATION:  SIMDDT.ABS is not available on the device
         (normally SYS), or a system error has occurred.  Consult
         a systems programmer.


?ZYQNCA No core available - can not proceed

         EXPLANATION:  The program cannot run with too small core
         size.

         USER ACTION:  If possible, allocate more core (virtual
         and/or physical) and try again.


%ZYQNEC Not enough core.  Cannot load SIMDDT

         EXPLANATION:  The program is too big to allow for
         SIMDDT.

         USER ACTION:  See ZYQNCA.

         RTS ACTION:   The program continues without SIMDDT.
DECsystem-10 SIMULA Language Handbook, part II           Page 143
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


%ZYQNIO No free I/O channel.  Cannot load SIMDDT

         EXPLANATION:  Probably a SIMULA system or user error.
         If an external MACRO-10 procedure is doing I/O, check
         it.  Consult a systems programmer if the error cannot be
         located.


[ZYQNYI RTS not yet initialised, continuing ...]

         EXPLANATION:  REENTER was used too early after program
         start.  Try later.


%ZYQOUF OPEN UUO failed.  Cannot load SIMDDT

         EXPLANATION:  Probably a DECsystem10 error.  Consult a
         systems programmer.


?ZYQREZ SIMULA RTS Error ZYQnnn

         EXPLANATION:  Since SIMDDT could not be loaded, the
         proper error message could not be issued.  Look up the
         message ZYQnnn in this handbook.


%ZYQSFS STOP statement executed or EXIT called in FORTRAN
         subprogram

         EXPLANATION:  An external FORTRAN subroutine attempted
         to stop execution by a STOP statement or CALL EXIT.
         Handled as if control has passed through the final END
         of the SIMULA main program.


The following messages are issued by SIMDDT:


ZYQ001   Source program error

         EXPLANATION:  An incorrect part of the source program
         has been compiled as an error UUO.


ZYQ002   Array index out of bounds


ZYQ003   QUA error

         EXPLANATION:  In an expression of the form "X QUA C", X
DECsystem-10 SIMULA Language Handbook, part II           Page 144
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


         does not refer to a C object or an object belonging to a
         subclass of C.


ZYQ004   Illegal denotes or wrong parameter qualification

         EXPLANATION:  See explanation for ZYQ003.  ZYQ004
         results from an implicit QUA check generated for a
         denotes (:-) statement or when a REF(...) parameter is
         passed to a class or procedure.


ZYQ005   No match for virtual quantity

         EXPLANATION:  The quantity (procedure, switch or label)
         was specified virtual, but no matching declaration is
         available at any prefix level of the class object to
         which the quantity should belong, i e the current class,
         prefixed block, inspection block or the class object
         referred to by the quantity before the dot in case of
         remote access.


ZYQ006   CHAR argument out of bounds

         EXPLANATION:  Argument must be >= 0 and <=127.


ZYQ007   Wrong number of subscripts

         EXPLANATION:  A formal array was used with wrong number
         of subscripts.


ZYQ010   OCERR   0,Too many files

         EXPLANATION:  At most 14 files can be active at the same
         time.


ZYQ011   OCERR   1,Pushdown list underflow

         EXPLANATION:  Should not occur.  Wild jumps may have
         been executed as a result of removing the checking of
         array subscripts (-A) or qualification (-Q), or an
         external MACRO-10 or FORTRAN procedure may have run
         wild.

         USER ACTION:  If none of the above conditions hold,
         report the error.
DECsystem-10 SIMULA Language Handbook, part II           Page 145
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ013   OCERR   3,OPEN failure

         EXPLANATION:  Failure when trying to OPEN the channel
         for SYSIN or SYSOUT.


ZYQ015   OCERR   5,Object NONE

         EXPLANATION:  An attempt was made to refer to an
         attribute of a non-existent class object (or to a not
         yet allocated array object).


ZYQ016   OCERR   6,Illegal memory reference

         EXPLANATION:  Probably a SIMULA system error or a user
         error in an external MACRO-10 or FORTRAN procedure.  It
         may also be a user error in the SIMULA program or an
         external SIMULA procedure or class, if compile-time
         checking was partially turned off (-A or -Q switches).
         If so, try running with those checks on.  If the error
         persists, check any external MACRO 10 or FORTRAN
         procedure for errors.


ZYQ017   OCERR   7,Integer overflow or division by zero

         EXPLANATION:  An arithmetic operation has exceeded the
         valid number range, or attempted to divide by zero.


ZYQ020   OCERR   10,Floating point overflow or division by zero

         EXPLANATION:  A floating point operation gives a result
         outside of the available number range, or division by
         zero is attempted.


ZYQ021   CPERR   0,RESUME:  object NONE


ZYQ022   CPERR   1,RESUME:  terminated class instance


ZYQ023   CPERR   2,RESUME:  attached class instance


ZYQ024   CPERR   3,RESUME:  operating class instance


DECsystem-10 SIMULA Language Handbook, part II           Page 146
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ025   CPERR   4,CALL:  object NONE


ZYQ026   CPERR   5,CALL:  terminated class instance


ZYQ027   CPERR   6,CALL:  attached class instance


ZYQ030   CPERR   7,CALL:  operating class instance


ZYQ036   CSERR   1,Undefined GOTO

         EXPLANATION:  The target of the GOTO statement is not
         operating.


ZYQ037   CSERR   2,Illegal GOTO

         EXPLANATION:  Attempt to leave a detached class instance
         by a GOTO.


ZYQ040   CSERR   3,Too big array

         EXPLANATION:  The size of the array would be > 2↑18
         words.


ZYQ041   CSERR   4,Upper bound of array < lower bound



ZYQ042   CSERR   5,Cannot use switch in terminated class

         EXPLANATION:  Cannot use a switch in a terminated class
         instance.


ZYQ043   CSERR   6,Procedure should have no parameters

         EXPLANATION:  Attempt to call a parameterless formal or
         virtual procedure with an actual parameter list.


ZYQ044   CSERR   7,Parameters missing

         EXPLANATION:  Attempt to call a formal or virtual
         procedure with declared parameters without an actual
         parameter list.
DECsystem-10 SIMULA Language Handbook, part II           Page 147
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ051   IOERR   0,File not open

         EXPLANATION:  File not opened when OUTIMAGE, OUTTEXT or
         another output procedure was called.


ZYQ052   IOERR   1,OPEN failure

         EXPLANATION:
         a) The requested device is in use and cannot be shared
         b) The requested device does not exist
         c) The device is restricted and has not been assigned
         via a MOUNT command.


ZYQ053   IOERR   2,File already assigned to TTY

         EXPLANATION:  Only one file may be assigned to the
         output or the input side of the TTY.


ZYQ054   IOERR   3,Transfer failure

         EXPLANATION:  A read or write operation fails.


ZYQ055   IOERR   4,File already open


ZYQ056   IOERR   5,File already closed


ZYQ057   IOERR   6,CLOSE failure

         EXPLANATION:  Write operation failure in CLOSE
         procedure.


ZYQ060   IOERR   7,EOF in INIMAGE

         EXPLANATION:  ENDFILE procedure returned TRUE when
         INIMAGE was called.


ZYQ061   IOERR   10,External image too long

         EXPLANATION:  The external image (string of characters
         finished by LF, FF, VT, or altmode) cannot fit into the
         image text.
DECsystem-10 SIMULA Language Handbook, part II           Page 148
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ062   IOERR   11,Image too large

         EXPLANATION:  The internal image is too long for
         imagesize of a directfile.


ZYQ063   IOERR   12,EJECT:  argument out of range

         EXPLANATION:  The argument to EJECT is <= 0.


ZYQ064   IOERR   13,SPACING:  argument out of range

         EXPLANATION:  The argument to SPACING is < 0 or >
         LINESPERPAGE.


ZYQ065   IOERR   14,Output field width out of range

         EXPLANATION:  For an output editing procedure, the
         requested field width is negative or zero or does not
         fit into an output image.


ZYQ066   IOERR   15,Output limit exceeded

         EXPLANATION:  The number of blocks written to an outfile
         (printfile) has reached the limit established with a
         LIMIT switch in the file specification.


ZYQ067   IOERR   16,OUTIMAGE (DIRECTFILE):  LOC <= 0


ZYQ070   IOERR   17,OUTIMAGE (DIRECTFILE).  File is read only


ZYQ071   IOERR   20,INCHAR:  end of file


ZYQ072   IOERR   21,ININT:  INREAL:  INFRAC:  end of file


ZYQ073   IOERR   22,ININT:  INREAL:  INFRAC:  field length
         negative


ZYQ074   IOERR   23,INTEXT:  end of file


DECsystem-10 SIMULA Language Handbook, part II           Page 149
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ075   IOERR   24,INTEXT:  length out of range

         EXPLANATION:  The specified length must be >= 0 and <
         2↑18


ZYQ100   PHERR   0,Actual parameter is an expression - assignment
         is illegal


ZYQ101   PHERR   1,Function name passed as actual parameter -
         value needed

         EXPLANATION:  The actual parameter is just a procedure
         name, but a value is required.


ZYQ102   PHERR   2,Invalid actual parameter to "QUICK" procedure
         - incorrect type or too complicated

         EXPLANATION:  This corresponds to either of the
         compile-time errors SIM417 or SIM420.  See these.  The
         error could not be determined at compile time.


ZYQ103   PHERR   3,Assignment to formal parameter - r.h.s.  not
         subclass of l.h.s.


ZYQ104   PHERR   4,Illegal use of a parameter which is a text
         constant

         EXPLANATION:  A text constant, passed as an actual
         parameter which matches a text parameter by name, is
         used in a place where a text constant is not allowed, e
         g on the right or left hand side of an (implied or
         explicit) denotes (:-) statement, on the left hand side
         of an assignment or in another context which would
         affect the contents of the text constant or change its
         position indicator.

         USER ACTION:  Specify the formal parameter by value or
         use COPY on the calling side.


ZYQ106   PHERR   6,Wrong number of parameters to formal or
         virtual procedure


DECsystem-10 SIMULA Language Handbook, part II           Page 150
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ107   PHERR   7,Wrong actual parameter type


ZYQ110   PHERR   10,Text constant by reference is illegal

         USER ACTION:  See app.  C, message SIM366.


ZYQ111   PHERR   11,Wrong qualification on actual parameter


ZYQ112   PHERR   12, Actual/formal types incompatible


ZYQ113   PHERR   13,Wrong kind of actual parameter


ZYQ121   RDERR   1,DISCRETE:  wrong number of subscripts


ZYQ122   RDERR   2,ERLANG:  first parameter not positive


ZYQ123   RDERR   3,ERLANG:  second parameter not positive


ZYQ124   RDERR   4,HISTD:  wrong number of subscripts


ZYQ125   RDERR   5,HISTO:  wrong number of subscripts


ZYQ126   RDERR   6,HISTO:  incompatible array parameters


ZYQ127   RDERR   7,LINEAR:  wrong number of subscripts


ZYQ130   RDERR   10,LINEAR:  array bounds do not match


ZYQ131   RDERR   11,NEGEXP:  first argument not positive


ZYQ132   RDERR   12,NORMAL:  standard deviation not positive


ZYQ133   RDERR   13,RANDINT:  interval negative


DECsystem-10 SIMULA Language Handbook, part II           Page 151
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ134   RDERR   14,UNIFORM:  interval not positive


ZYQ135   SAERR   0,Garbage collection not possible

         EXPLANATION:  The SIMDDT command USE may invoke the
         Garbage Collector in a state when a garbage collection
         cannot be done.  This can occur after a few run time
         errors.

         USER ACTION:  Do not issue the USE command in this case.


ZYQ136   SAERR   1,Cannot get enough core for object pool

         EXPLANATION:  The requisite data area could not be
         allocated for the SIMULA program to run.  This error
         will sometimes occur when a separately compiled module
         used by your program was not loaded.

         USER ACTION:  Obtain more core if possible or try to
         make core requirements smaller.


ZYQ144   SUERR   1,EVTIME:  object NONE


ZYQ145   SUERR   2,EVTIME:  passive process


ZYQ146   SUERR   3,Reactivation of terminated process


ZYQ147   SUERR   4,SQS empty

         EXPLANATION:  The last active process has been taken out
         of the sequencing set, and no process can be resumed.
         This is usually caused by cancelling or passivating the
         main program of SIMULATION.

         USER ACTION:  Activate the main program at some remote
         time.  Do not cancel or passivate main.


ZYQ154   TXERR   0,NOTEXT in editing procedure


ZYQ155   TXERR   1,PUTFRAC or OUTFRAC:  number of digits negative


DECsystem-10 SIMULA Language Handbook, part II           Page 152
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ156   TXERR   2,PUTFIX or OUTFIX:  number of digits negative


ZYQ157   TXERR   3,PUTREAL or OUTREAL:  number of digits negative


ZYQ160   TXERR   4,PUTCHAR:  pos out of range


ZYQ161   TXERR   5,GETCHAR:  pos out of range


ZYQ162   TXERR   6,SUB:  parameter out of range


ZYQ164   TXERR   10,Text assignment:  r.h.s.  text too long


ZYQ165   TXERR   11,GETINT or ININT:  no digits found or number
         too large

         EXPLANATION:  The first character that caused the error
         is printed.  If this character is a digit, then the
         number is too large.


ZYQ166   TXERR   12,GETREAL or INREAL:  did not find digits


ZYQ167   TXERR   13,GETREAL or INREAL:  item too large


ZYQ170   TXERR   14,GETFRAC or INFRAC:  no item found or item too
         large

         EXPLANATION:  The first character that caused the error
         is printed.  If this character is a digit, then the
         number is too large.


ZYQ171   TXERR   15,BLANKS:  parameter out of range


ZYQ172   TXERR   16,LOWTEN:  Illegal parameter


ZYQ173   TXERR   17,ININT:  no digits found or number too large

         EXPLANATION:  The first character that caused the error
         is printed.  If this character is a digit, then the
         number is too large.
DECsystem-10 SIMULA Language Handbook, part II           Page 153
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYQ174   TXERR   20,INREAL:  did not find digits


ZYQ175   TXERR   21,INREAL:  item too large


ZYQ176   TXERR   22,INFRAC:  no item found or item too large

         EXPLANATION:  The first character that caused the error
         is printed.  If this character is a digit, then the
         number is too large.


ZYQ214   User defined error

         EXPLANATION:  Reserved error number for future
         implementation of user defined errors.


ZYQ215   Error in FORTRAN library subroutine

         EXPLANATION:  An error occurred in a mathematical
         procedure like SQRT or SIN which SIMULA has taken
         directly from the FORTRAN library.  The procedure name,
         which is usually different from the SIMULA name, was
         given in a preceding message to the TTY.


ZYQ216   Illegal UUO executed

         EXPLANATION:  Either a MACRO-10 or FORTRAN subroutine
         used an UUO which is not recognized by the SIMULA
         system, or a unexpected error occurred such that
         execution got out of control.  See explanation for
         ZYQ016.

         USER ACTION:  Check especially for I/O in external
         FORTRAN procedures.  This is not allowed.  If the error
         cannot be traced to subroutines outside the SIMULA
         system, report to the SIMULA maintenance group.


ZYQ217   RTS logic error

         EXPLANATION:  This message indicates that the run time
         system has encountered a situation with which it cannot
         cope, i e the data structures are inconsistent or a
         coding error exists in the RTS.

         USER ACTION:  Report to the SIMULA maintenance group,
         after making the checks suggested for ZYQ016.
DECsystem-10 SIMULA Language Handbook, part II           Page 154
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


         EXPLANATION:

         SIMDDT DIAGNOSTICS


         The messages starting with ZYD apply to the SIMDDT
         system.
         Some of the messages ZYD001 to ZYD177 may also appear.
         The description is found in the corresponding ZYQ entry,
         ZYD signals that the error occurred while SIMDDT was
         active.  SIMDDT uses some of the RTS routines, e.g.  the
         GETINT routine which is called when an integer is
         expected in the input command.  If no integer is found
         the message ZYD165 is given.  Note that SIMDDT
         processing may continue in most cases.


         SIMDDT will output the command followed by an
         appropriate message when an error is detected in an
         input command.  The input command will be reproduced up
         to and including the last character that was analysed by
         SIMDDT.


?ZYD476 ERROR WHILE INITIATING SIMDDT

         EXPLANATION:  It was not possible to initiate SIMDDT and
         processing can not continue.

         USER ACTION:  Report the problem to the SIMULA
         maintenance group.


?ZYD477 ERROR WHILE PROCESSING ERROR

         EXPLANATION:  A new error was detected while SIMDDT was
         processing an error.  It is not possible to continue.

         USER ACTION:  Report the problem to the SIMULA
         maintenance group.


ZYD500   CHAR

         EXPLANATION:  The messages ZYD500 to ZYD547 are used in
         SIMDDT to create information text.  The ZYDnnn number is
         suppressed.


DECsystem-10 SIMULA Language Handbook, part II           Page 155
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD501   =


ZYD502   CURRENT BLOCK POINTER AT LINE

         EXPLANATION:  The approximate line on which the current
         block starts is given after each INSPECT command.  


ZYD503   LENGTH=


ZYD504   POS=


ZYD505   SUBTEXT STARTS AT POSITION=


ZYD506   TERMINATED


ZYD507   INSPECT BLOCK


ZYD510   PREFIXED BLOCK


ZYD511   EVTIME=


ZYD512   SIMDDT COMMANDS:

         EXPLANATION:  Messages ZYD512 to ZYD547 are displayed
         when the HELP command is given.


ZYD513   [STOP] AT <LINE> [,<N>] [<STRING>]

         SIMDDT ACTION:  Identifies a breakpoint and outputs a
         message every n:th time the statement is executed.  If
         STOP was specified execution is halted and new SIMDDT
         commands are accepted.


ZYD514   [STOP] AT <LINE> [<STRING>] [IFCHANGED] <IDENTIFIER>
         [,<IDENTIFIER> ,...]

         SIMDDT ACTION:  Identifies a breakpoint.  If IFCHANGED
         specified SIMDDT will output all changed variable values
         otherwise the values are always given.
DECsystem-10 SIMULA Language Handbook, part II           Page 156
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD515   [STOP] AT <LINE> [<STRING>] IF <IDENTIFIER> <RELATION
         OPERATOR> <VALUE>

         SIMDDT ACTION:  Identifies a breakpoint.  SIMDDT will
         output the variable value if the relation is TRUE.  The
         <RELATION OPERATOR> can be one of
         > >= < <= = = GT GE LT LE EQ == =/= EQV IS IN.
         The <VALUE> can be an <IDENTIFICATION> or TRUE, FALSE,
         NOTEXT, NONE, arithmetic constant, character constant,
         text value constant or CLASS identifier.


ZYD516   REMOVE [ AT <LINE> ]

         SIMDDT ACTION:  Remove all breakpoint commands for a
         specific line or remove all existing breakpoints.


ZYD517   [STOP] BREAKS

         SIMDDT ACTION:  List all breakpoint commands.The input
         order is not kept.  If STOP specified SIMDDT will halt
         after each breakpoint command to give the user the
         possibility to remove it.  When all breakpoint commands
         for a line are removed the breakpoint is removed.

         USER ACTION:  Type REMOVE to remove the last command
         listed or type an empty line (RETURN key) to keep
         command.


ZYD520   OUTPUT <IDENTIFIER> [,<IDENTIFIER> ,...]

         SIMDDT ACTION:  0utput the values of the variables.


ZYD521   INPUT <IDENTIFIER> <ASSIGNMENT OPERATOR> <VALUE>

         SIMDDT ACTION:  Changes the value of the referenced
         variable to the value given in the command.The operators
         are := and :-.  See ZYD515 for explanation of <VALUE>.
         This command is not valid after an error as it is not
         possible to continue user program execution.


ZYD522   PROCEED

         SIMDDT ACTION:  SIMDDT will either start program
         execution or continue processing at the point where it
         was interrupted.  PROCEED is not valid after an error.
DECsystem-10 SIMULA Language Handbook, part II           Page 157
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD523   USE <FILE SPECIFICATION>

         SIMDDT ACTION:  SIMDDT output will be written on the
         file specified in the command.  All output that signals
         a user action is also output on TTY.  The file is not
         closed until a new USE command is given or at the end of
         execution.  The format of the <FILE SPECIFICATION> is
         the same as the one used for the other user files, see
         chapter 8.2.  USE TTY:  will reset the SIMDDT output to
         the terminal.


ZYD524   CHAIN

         SIMDDT ACTION:  Writes the dynamic operating chain
         starting with the current block.  Only procedures, class
         instances, prefixed blocks and inspected blocks are
         given.  The name of the block and its activation line
         are listed.


ZYD525   VARIABLES

         SIMDDT ACTION:  The complete storage pool is scanned and
         all variables that are of a type treated by SIMDDT are
         listed together with the name of the dynamic block in
         which the variables are declared.  In order to reduce
         output only variables which do not have their initial
         values are given.  The amount of data is often very
         large, and the USE command can be used to direct the
         output to a LPT file.


ZYD526   NOARRAYS

         SIMDDT ACTION:  See above command VARIABLES.  The
         difference is that all ARRAY elements are skipped in the
         output.


ZYD527   SCHEDULED

         SIMDDT ACTION:  Gives the name and EVTIME for all
         scheduled processes.


ZYD530   ALL

         SIMDDT ACTION:  Produces the same information as if the
         commands CHAIN,VARIABLES and SCHEDULED had been given.
         After an error the output is written on the SYSOUT file.
DECsystem-10 SIMULA Language Handbook, part II           Page 158
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD531   EXIT

         SIMDDT ACTION:  Returns control to the RTS system which
         closes all files and then returns to the monitor.


ZYD532   DISPLAY [<MODULE>:] <NNNNN> [-<NNNNN>]

         SIMDDT ACTION:  Displays the source program line or
         lines that are given in the command.


ZYD533   INSPECT <IDENTIFIER> !  /RETURN !  /UP !  /RESET !
         /START

         SIMDDT ACTION:  The current program block (CB) is
         changed.


ZYD534   EXAMPLES OF SIMDDT COMMANDS:



ZYD535   STOP AT 55 ,3

         EXPLANATION:  Set a breakpoint at first statement on
         line 55 and stop processing every third time the
         statement is executed so that the user can communicate
         with SIMDDT.


ZYD536   AT 10 IFCHANGED VREAL,VTEXT

         EXPLANATION:  Output the variable value if any of the
         variables were changed since the last time the statement
         at line 10 was to be executed.  The first time the
         values are compared with the initial values.


ZYD537   INPUT VTEXT:="TEXT VALUE ASSIGNMENT"

         EXPLANATION:  Change the value of the text variable.
         Note that only the characters may be changed, not the
         length.


DECsystem-10 SIMULA Language Handbook, part II           Page 159
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD540   SIMDDT STARTED

         EXPLANATION:  This message is given before any of the
         user program statements have been executed.  SIMDDT and
         SIMRTS have been initialized.

         USER ACTION:  Give a HELP, set breakpoint, USE or
         PROCEED command.

         SIMDDT ACTION:  It is waiting for a SIMDDT command.
         User program execution will start when the PROCEED
         command is received and until then a "*" will be written
         to signal that a new command is expected.


ZYD541   ?  ERROR IN JOB

         EXPLANATION:  When an error occurs the SIMDDT is invoked
         and an error message is routed both to TTY and SYSOUT.
         The line on which the error occurred will be given and a
         ZYQnnn message will follow.

         USER ACTION:  To get information on the cause of the
         error the user can give any of the commands OUTPUT,
         CHAIN, SCHEDULED, USE and ALL.  The command EXIT should
         be given to terminate the program and close all files.
         ↑C can be used to exit without closing any files.


ZYD542   DETACHED



ZYD543   NO SCHEDULED PROCESSES



ZYD544   SCHEDULED PROCESSES



ZYD545   OPERATING CHAIN



ZYD546   VARIABLES EXCEPT ARRAYS



DECsystem-10 SIMULA Language Handbook, part II           Page 160
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD547   VARIABLES



ZYD550   LINE OVERFLOW ON INPUT

         EXPLANATION:  A maximum of 135 characters are allowed in
         the input command.

         USER ACTION:  Give new command.

         SIMDDT ACTION:  Command is not processed.


ZYD551   COMMAND NOT RECOGNIZED

         EXPLANATION:  Either the command is misspelled or the
         name given is not unique.  Example:  The INPUT command
         must be given as INP while OUTPUT can be shortened to a
         single O.  SIMDDT has a table of all special keywords
         and IN is one of them.


ZYD552   NOT VALID IN DEBUG MODE


ZYD553   NOT VALID IN ERROR MODE

         EXPLANATION:  It is not possible to continue processing
         after an error has ocurred.  The set breakpoints, INPUT,
         REMOVE and PROCEED commands are not of any use.


ZYD556   ASSIGNMENT TO SYSTEM PROCEDURE IS NOT POSSIBLE

         EXPLANATION:  System procedures are not allowed as left
         hand side operands.  The only exception is text.MAIN.


ZYD557   TEXT ATTRIBUTE IS NOT MAIN

         EXPLANATION:  The only text attribute handled by SIMDDT
         is MAIN.


ZYD560   IDENTIFIER HAS TYPE LABEL

         EXPLANATION:  Labels are not handled by SIMDDT.

         SIMDDT ACTION:  Command is ignored.
DECsystem-10 SIMULA Language Handbook, part II           Page 161
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD561   IDENTIFIER HAS MODE NAME

         EXPLANATION:  Parameters of mode name are not handled by
         SIMDDT.

         SIMDDT ACTION:  Command is ignored.


ZYD562   IDENTIFIER HAS KIND PROCEDURE AND IS NOT HANDLED BY
         SIMDDT

         EXPLANATION:  Procedures handled by SIMDDT are MAIN,
         SYSIN, SYSOUT, FIRST, LAST, SUC, PRED, PREV, EVTIME,
         NEXTEV, TIME and CURRENT.

         SIMDDT ACTION:  Command is ignored.


ZYD563   IDENTIFIER HAS KIND CLASS

         EXPLANATION:  Class identifier can only be handled by
         SIMDDT in connection with the relation operators IS and
         IN.

         SIMDDT ACTION:  Command is ignored.


ZYD564   IDENTIFIER IS UNDEFINED

         EXPLANATION:  The identifier is not in the symbol table.

         SIMDDT ACTION:  Command is ignored.


ZYD565   DOT NOTATION BUT IDENTIFIER IS NOT TYPE REF OR TEXT

         SIMDDT ACTION:  Command is ignored.


ZYD566   IDENTIFIER EXPECTED IN INPUT

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 162
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD567   IDENTIFIER NOT VISIBLE IN SYMBOL TABLE

         EXPLANATION:  
         1) The identifier name is misspelled
         2) The identifier is not visible from the current
         program block (CB).  For an INPUT or OUTPUT command CB
         is the block in which program execution was interrupted
         or the block which the CB was moved to with the INSPECT
         command and for a breakpoint command CB is the block
         which contains the statement referenced via the line
         number.  Note that no identifiers can be reached via the
         OUTPUT or INPUT commands before the user program has
         been started.
         3) The generation of linenumber or symbol table was
         suppressed during compilation.

         SIMDDT ACTION:  Command is ignored.


ZYD570   SUBSCRIPTS IN INPUT, BUT IDENTIFIER IS NOT ARRAY

         SIMDDT ACTION:  Command is ignored.


ZYD571   SUBSCRIPTS MISSING AFTER ARRAY IDENTIFIER

         SIMDDT ACTION:  Command is ignored.


ZYD572   , OR ) OR ] EXPECTED AFTER SUBSCRIPTS

         SIMDDT ACTION:  Command is ignored.


ZYD573   ATTRIBUTE IDENTIFIER EXPECTED AFTER DOT

         SIMDDT ACTION:  Command is ignored.


ZYD574   WRONG NUMBER OF SUBSCRIPTS IN IDENTIFICATION

         EXPLANATION:  When an array element is referenced in a
         breakpoint command the number of subscripts cannot be
         checked until the breakpoint statement is reached.

         SIMDDT ACTION:  The breakpoint command is removed.  


ZYD575   SUBSCRIPT LESS THAN LOWER BOUND

         SIMDDT ACTION:  See previous message.
DECsystem-10 SIMULA Language Handbook, part II           Page 163
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD576   SUBSCRIPT GREATER THAN UPPER BOUND

         SIMDDT ACTION:  See previous message.


ZYD577   END OF INPUT OR , EXPECTED

         EXPLANATION:  The , should precede the next
         identification.


ZYD600   NO MORE FREE WORK AREA , REMOVE BREAKPOINTS

         EXPLANATION:  The area in which an internal form of the
         breakpoint commands are saved is full.

         SIMDDT ACTION:  The new command is ignored.

         USER ACTION:  Give a STOP BREAKS command and REMOVE the
         less useful breakpoints.


ZYD601   QUALIFICATION ERROR

         EXPLANATION:  A common error is that a reference type
         variable used in a dot notation has the value NONE.

         SIMDDT ACTION:  See message ZYD574.


ZYD602   RELATION OPERATOR EXPECTED

         EXPLANATION:  The keyword IF has been found in the
         command and a <RELATION OPERATOR> is expected after the
         identification.

         SIMDDT ACTION:  Command is ignored.


ZYD603   END OF INPUT EXPECTED

         SIMDDT ACTION:  An AT or BREAKS command is ignored.  An
         INPUT command is processed.


ZYD604   MORE THAN ONE LOOP COUNTER

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 164
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD605   INVALID LOOP COUNTER VALUE

         SIMDDT ACTION:  Command is ignored.


ZYD606   NO MORE FREE BREAKPOINT ENTRIES

         EXPLANATION:  The maximum number of different
         breakpoints that can be set up is 20.

         SIMDDT ACTION:  The new breakpoint command is ignored.

         USER ACTION:  Use STOP BREAKS and remove some of the
         uninteresting breakpoints.


ZYD611   COLON MISSING AFTER MODULE NAME

         SIMDDT ACTION:  Command is ignored.


ZYD612   CHARACTER CONSTANT, CLOSING ' MISSING

         SIMDDT ACTION:  Command is ignored.


ZYD613   := OR :- EXPECTED

         EXPLANATION:  The INPUT command must contain an
         assignment operator.

         SIMDDT ACTION:  Command is ignored.


ZYD614   DENOTES ONLY VALID AFTER REF OR TEXT VARIABLE

         SIMDDT ACTION:  Command is ignored.


ZYD615   := NOT VALID AFTER REF VARIABLE

         SIMDDT ACTION:  Command is ignored.


ZYD616   TEXT VALUE CONSTANT NOT VALID IN TEXT REFERENCE
         ASSIGNMENT

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 165
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD617   DIFFERENT TYPES IN INPUT COMMAND

         EXPLANATION:  No conversion between real and integer or
         vice versa is made by SIMDDT.  The types must be equal
         except for LONG REAL and REAL variables which can be
         mixed.

         SIMDDT ACTION:  Command is ignored.


ZYD620   NO BREAKPOINT

         EXPLANATION:  No breakpoint has been set at the
         statement specified via the linenumber.

         SIMDDT ACTION:  Command is ignored.


ZYD621   AT OR END OF INPUT EXPECTED

         SIMDDT ACTION:  Command is ignored.


ZYD622   REMOVE OR END OF INPUT EXPECTED

         EXPLANATION:  The command STOP BREAKS was given.

         SIMDDT ACTION:  The last listed breakpoint command is
         kept.


ZYD623   SIMDDT ENTERED, PROGRAM INTERRUPTED AT

         EXPLANATION:  The program was interrupted, probably via
         ↑C and then entered via the REENTER monitor command.
         This message also appears when the program was entered
         via the CONTINUE command after program exit.  The SIMRTS
         routine fetched SIMDDT from disk if it was not already
         started and entered SIMDDT.  This feature can be used to
         detect where a program is looping.


ZYD625   FINAL " MISSING IN TEXT CONSTANT

         SIMDDT ACTION:  Command is ignored.


ZYD626   LENGTH OF RIGHT HAND SIDE > LEFT HAND SIDE IN TEXT VALUE
         ASSIGNMENT

         SIMDDT ACTION:  Command is ignored.
DECsystem-10 SIMULA Language Handbook, part II           Page 166
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD627   ATTRIBUTE IDENTIFIER NOT FOUND IN SYMBOL TABLE

         SIMDDT ACTION:  The input command up to the last
         character which has been processed by SIMDDT is written
         to the TTY to help the user to find the invalid
         attribute identifier.  Command is ignored.


ZYD630   IDENTIFICATION OR CONSTANT OF CORRECT TYPE EXPECTED IN
         INPUT

         EXPLANATION:  See message ZYD617.  No type conversion is
         done by SIMDDT.

         SIMDDT ACTION:  Command is ignored.


ZYD631   TYPE ERROR IN DYNAMIC RECORD

         EXPLANATION:  This message should usually not be given.
         One of the dynamic records in the storage pool has a
         type which is not recognized by SIMDDT.  The message may
         appear while processing the VARIABLES, NOARRAYS or ALL
         commands.

         SIMDDT ACTION:  Command processing is terminated.

         USER ACTION:  If you cannot explain the error, e.g.  use
         of MACRO 10 procedures, use of the switches -A or -Q in
         compilation of the main program or any external
         procedure or class, please report the problem to the
         SIMULA maintenance group.


ZYD632   GARBAGE COLLECTOR NOT CALLED BEFORE VARIABLES TYPED

         EXPLANATION:  SIMDDT will call the garbage collector
         routine unless the program was interrupted (see ZYD623)
         or a critical error occurred (e.g.  storage allocation
         error).


ZYD635   SIMDDT IN DEBUG MODE AND USE FILE USED BY USER PROGRAM

         EXPLANATION:  It is only possible to let SIMDDT continue
         to write on an open user file if an error has occurred.

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 167
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD636   INVALID MODULE NAME

         EXPLANATION:  MAIN or the SIMULA name of a separately
         compiled class or procedure are valid module names.

         SIMDDT ACTION:  Command is ignored.


ZYD637   LINE NUMBER NOT FOUND IN TABLE

         EXPLANATION:  The line is not found in the current line
         number table.  That is the line number table found via
         the module name if any, or found via the module in which
         the current block is placed.  The line number must fall
         within the table but if no exact match is found the
         first larger number is chosen.  One reason may be that
         the source module was compiled with the switch -I.

         SIMDDT ACTION:  Command is ignored.


ZYD640   NO MORE WORK AREA FOR TEXT OR REF VARIABLE, REMOVE
         BREAKPOINTS 

         EXPLANATION:  The number of text and ref identifiers
         which can be used in the breakpoint commands is limited.

         SIMDDT ACTION:  The command is ignored.

         USER ACTION:  See message ZYD600


ZYD641   IDENTIFIER AND OPERATOR INCOMPATIBLE

         SIMDDT ACTION:  Command is ignored.


ZYD642   CLASS IDENTIFIER EXPECTED

         EXPLANATION:  The class identifier must follow the IS or
         IN operator in the breakpoint command.  A class
         identifier must be declared in the same module in which
         the breakpoint is placed.

         SIMDDT ACTION:  Command is ignored.


ZYD643   REF OR ARRAY VARIABLE NOT INITIALIZED

         EXPLANATION:  An unusual situation has occurred.  The
         user program execution was interrupted while setting up
DECsystem-10 SIMULA Language Handbook, part II           Page 168
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


         a dynamic record.


ZYD644   COMMAND NOT ALLOWED WHEN PROGRAM EXECUTION WAS
         INTERRUPTED

         EXPLANATION:  There are some command restrictions when
         SIMDDT was entered after the user program was
         interrupted.  The restrictions hold only when the
         message ZYD623 was given at entry to SIMDDT.  The USE
         command, the DISPLAY command and a set breakpoint
         command which contains a text constant are not allowed
         as they may lead to a garbage collection.

         USER ACTION:  Find a statement in the program which will
         be executed immediately or very soon after the
         interrupted point.  Set a STOP AT breakpoint there and
         PROCEED to it.

         A hint:  INSPECT/START will tell you where your program
         was interrupted.  Try to set a breakpoint on the next
         line!


ZYD645   CURRENT BLOCK IS TERMINATED

         EXPLANATION:  It is an unusual case that the current
         block is terminated.

         SIMDDT ACTION:  The garbage collection is inhibited.


ZYD646   USE FILE IS NOT AN OUTFILE

         EXPLANATION:  The use file is used by the program but it
         is not an outfile.

         SIMDDT ACTION:  Command is ignored.


ZYD647   - OR END OF LINE EXPECTED

         EXPLANATION:  Line or line interval expected in DISPLAY
         command.

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 169
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD650   LINE INTERVAL ERROR

         EXPLANATION:  Line or line interval is not correct in a
         DISPLAY command.

         SIMDDT ACTION:  Command is ignored.


ZYD651   LINE NOT FOUND IN MODULE

         EXPLANATION:  The line or lines that were requested in a
         DISPLAY command was not found in the source program
         file.  


ZYD652   /RETURN OR /UP NOT ALLOWED

         EXPLANATION:  The command INSPECT /RETURN or /UP is not
         valid if the current block is terminated or /RETURN
         given when the current block is a detached class
         instance.

         SIMDDT ACTION:  The current block is unchanged.


ZYD653   KEYWORD EXPECTED AFTER /

         EXPLANATION:  /UP, /RETURN, /START or /RESET expected in
         the INSPECT command.

         simddt action:  Command is ignored.


ZYD654   OBJECT REFERENCE EXPECTED

         EXPLANATION:  Object reference or /keyword expected in
         an INSPECT command.  This message is also given when the
         object reference variable has the value NONE.

         SIMDDT ACTION:  Command is ignored.


ZYD655   VALUE NOT ACCESSIBLE FROM TERMINATED BLOCK

         EXPLANATION:  The only variables that are accesible from
         a terminated class instance are the class attributes.

         SIMDDT ACTION:  Command is ignored.


DECsystem-10 SIMULA Language Handbook, part II           Page 170
APPENDIX D.2 RUN-TIME AND DEBUG DIAGNOSTICS


ZYD674   BREAKPOINT UUO FOUND, BUT BREAKPOINT NOT KNOWN TO SIMDDT

         EXPLANATION:  It is probably a SIMDDT error.


ZYD675   SIMDDT TERMINATION ERROR

         SIMDDT ACTION:  The program is terminated.

         USER ACTION:  Report the problem to the SIMULA
         maintenance group.


ZYD676   INVALID MESSAGE NUMBER

         EXPLANATION:  An message number that is new to the
         SIMDDT program has been detected.  The unknown message
         number is placed at the start of this message, e.g.
         ZYD700 ZYD676 INVALID MESSAGE NUMBER

         USER ACTION:  Report the problem to the SIMULA
         maintenance group.


ZYD677   COMMAND OR FEATURE NOT IMPLEMENTED

         EXPLANATION:  The command is recognized but the
         implementation is not part of this version of SIMDDT.

         SIMDDT ACTION:  The command is ignored.


    END OF RUN-TIME AND DEBUG DIAGNOSTICS
DECsystem-10 SIMULA Language Handbook, part II           Page 171
APPENDIX E HOW TO WRITE AN EXTERNAL FORTRAN OR MACRO-10 PROCEDURE





APPENDIX E HOW TO WRITE AN EXTERNAL FORTRAN OR MACRO-10 PROCEDURE
=================================================================


     The handling of external FORTRAN and MACRO-10 procedures may
     be visualized by the aid of the following figure which shows
     the relation between the processors and files involved:


                             proc.sim            proc.for/mac
                                !                     !
                                v                     v
                        -----------------    ------------------
                        [SIMULA COMPILER]    [FORTRAN/MACRO-10]
                        -----------------    ------------------
                                !                     !
                                v                     !
                             proc.atr                 !
                                !                     !
                                v                     !
                        -----------------             !
             main.sim-->[SIMULA COMPILER]             !
                        -----------------             !
                                !                     !
                                !                     !
                                v       --------      v
                             main.rel-->[LOADER]<--proc.rel
                                        --------
                                           !
                                           !
                                        main.sav


     IMPORTANT:  The .ATR and .REL file names for an external
     FORTRAN or MACRO-10 procedure should be identical except for
     the extension, and should be stored under the same ppn.  If
     they are stored in library files, the libraries should be
     identical except for the extension (.ATR for ATR-file
     libraries and .REL for REL-file libraries) and be stored
     under the same ppn.
DECsystem-10 SIMULA Language Handbook, part II           Page 172
APPENDIX E.1  EXTERNAL FORTRAN PROCEDURES.


E.1  EXTERNAL FORTRAN PROCEDURES


     To create an attribute file, a corresponding procedure
     heading must be compiled by the SIMULA compiler.  Preceding
     the procedure heading there must be an OPTIONS statement of
     the form:

             OPTIONS(/nEXTERNAL:codeword,entry);

     where codeword is FORTRAN or F40.  FORTRAN signals that the
     procedure is compiled with the FORTRAN-10 compiler and F40
     that the procedure is compiled with the old FORTRAN
     compiler.
     The entry point of the procedure is named "entry".  It is
     the same as the name of the SUBROUTINE or FUNCTION in the
     FORTRAN program.

     Parameter restrictions:
     Only the types ( SHORT ) INTEGER, ( LONG ) REAL, CHARACTER
     and BOOLEAN can be transmitted.  An argument of type
     CHARACTER should be treated as an integer in the FORTRAN
     program.

     Allowed transmission modes:
     Simple types:  VALUE default, NAME optional.
     ARRAYs:  VALUE optional, reference default.

     The effect of a call by NAME is:  before the FORTRAN
     procedure is entered, the actual parameter is evaluated.  If
     it is a variable, a reference to that variable is
     transmitted, otherwise (constant or expression) the value is
     stored in a cell and a reference to that cell is
     transmitted.

     In an external FORTRAN procedure one must not use any
     facilities that demand the FORTRAN high segment (e.g.  I/O).

     Errors may occur for FORTRAN procedures with more than one
     entry point, if parameters are passed to the procedure using
     one entry point and used by the procedure after a call to
     another entry point.

     The SIMULA compiler will generate an attribute file but no
     rel-file.
     A SIMULA procedure heading has to be compiled before the
     main program and this should be done via the COMPILE or R
     monitor commands since no rel file is generated.  Care must
     be taken when giving an EXECUTE or LOAD command to ensure
     that the correct REL files are loaded.
DECsystem-10 SIMULA Language Handbook, part II           Page 173
APPENDIX E.2  FORTRAN PROGRAMMING EXAMPLE.


E.2  FORTRAN PROGRAMMING EXAMPLE


     In this example we have a FORTRAN procedure which compares
     two real arrays of the same size.

     FORTRAN program:

                     LOGICAL FUNCTION equala(a1,a2,n)
             C
                     DIMENSION a1(n),a2(n)
             C
                     equala=.TRUE.
             C
                     DO 1 i=1,n
                     IF( a1(i) .NE. a2(i) ) GOTO 2
             1       CONTINUE
                     RETURN
             2       equala=.FALSE.
                     RETURN
                     END


     The SIMULA specification program:

             OPTIONS(/E:FORTRAN,equala);
             BOOLEAN PROCEDURE equala(a1,a2,n);
             ARRAY a1,a2;
             INTEGER n;;


     If we have a declaration ARRAY a,b[c:d,e:f] then
             equala(a,b,(d-c+1)*(f-e+1))
     is true if and only if the arrays a and b are equal element
     for element.
DECsystem-10 SIMULA Language Handbook, part II           Page 174
APPENDIX E.3  EXTERNAL MACRO-10 PROCEDURES.


E.3  EXTERNAL MACRO-10 PROCEDURES


     To create an attribute file, a corresponding procedure
     heading must be separately compiled by the SIMULA compiler.
     Preceding the procedure heading there must be an OPTIONS
     statement of one of the following forms:

             OPTIONS(/nEXTERNAL:codeword,entry);
             OPTIONS(/nEXTERNAL:codeword,checkoption,entry);

     where codeword is CODE or QUICK, checkoption is CHECK or
     NOCHECK (-CHECK is also a valid form).  Here CODE or QUICK
     signals that the procedure is written in MACRO-10.  The
     entry point is named "entry" in the MACRO-10 module.

     If checkoption is the word CHECK, or checkoption is not
     given, the SIMULA compiler will check all actual parameters.
     The exact meaning of this is:
     All parameters must be specified.  The SIMULA compiler will
     check the actual parameters versus the formal and they must
     correspond in number and have compatible types.  All
     necessary type conversions will be performed by the system.

     If checkoption is NOCHECK (-CHECK), the procedure heading
     must not specify any formal parameters, implying that the
     formal parameters are unknown to the compiler.  The compiler
     can thus not perform any parameter checking.  This implies
     the following:
     All parameters are transmitted by NAME.  The number of
     actual parameters may vary from call to call but may not
     exceed 31 (5 if codeword is QUICK).

     If codeword is CODE, the procedure is called in the same way
     as a procedure coded in SIMULA.  If codeword is QUICK,
     however, a special, very efficient calling sequence is used,
     where all parameters are passed in accumulators, and no
     procedure block is allocated.  The procedure is called
     directly without run time system intervention (see calling
     standard, E.5.1).
     - A maximum of 5 to 10 parameters, depending on the types,
     kinds and modes of actual parameters, is allowed.
     - Parameters specified PROCEDURE, LABEL or SWITCH may not be
     specified by NAME.
     - The actual parameter corresponding to a formal parameter
     by NAME may not be an expression.  Exact type correspondence
     is required for arithmetic parameters by NAME.

     Note that QUICK,NOCHECK implies that all parameters (at most
     5) are transmitted by name, subject to the special
     restrictions on name mode parameters.
DECsystem-10 SIMULA Language Handbook, part II           Page 175
APPENDIX E.3  EXTERNAL MACRO-10 PROCEDURES.


     In all cases, the SIMULA compiler will generate an attribute
     file but no rel-file.
E.4  MACRO-10 CALLING STANDARD


E.4.1  Accumulator conventions:
       ------------------------

     At entry:

     AC17(XPDP) is a stack pointer.
     AC15(XCB)  points to the procedure instance of this call
     (see appendix B).

     When calling a RTS-routine:

     Three conventions TA1, TA2 and TA3 are used in the run-time
     system.
     For all routines:  The accumulators 0,1,2 and 16 are
     destroyed.  AC15 and AC17 must have the same value as on
     entry.
     For type TA1 routines:  All the other accumulators may also
     be destroyed.
     For type TA2 routines:  All the other accumulators are
     preserved over the call.
     For type TA3 routines:  The accumulators 3 up to N are
     preserved over the call.  N and a map of which accumulators
     point directly at dynamic objects are parameters in the
     call.  No accumulator may point into a dynamic object.

     At exit:

     AC15 and AC17 must have the same value as on entry.  All the
     others may be destroyed.


     To enable correct error diagnostics, AC15 and AC17 must not
     be changed during the execution of the procedure, except for
     using AC17 as a stack pointer.
DECsystem-10 SIMULA Language Handbook, part II           Page 176
APPENDIX E.4  MACRO-10 CALLING STANDARD.


E.4.2  Calling sequence to "QUICK" procedures
       --------------------------------------


     A MACRO-10 procedure corresponding to a specification file
     of the form
        OPTIONS(/EXTERNAL:QUICK,[,NOCHECK],entry);
        [<type>] PROCEDURE <SIMULA-name>[<parameter list>;
        <parameter specifications>;]
     is called very efficiently by a SIMULA program.


     Parameters to QUICK procedures

     All parameters are computed to accumulators, starting with
     the first ac not occupied by temporary results, normally
     XWAC1=AC3.  The representation of parameters is as shown in
     App B.3.  Depending on the specification, a parameter may
     occupy one or two ac's.  Since at most 10 ac's are
     available, this means that the maximum number of parameters
     ranges from 5 to 10.  If NOCHECK is specified, all
     parameters are transmitted by name, and since a parameter
     descriptor for a name parameter occupies two words, at most
     5 parameters may be passed.


     Entering a QUICK procedure

     After computation of parameters, the procedure is called by
     PUSHJ  XPDP,entry, where XPDP=AC17.

     If the procedure has no type (pure procedure), no
     intermediate results will exist in ac's when the procedure
     is called.  Thus the first parameter is always in XWAC1
     (AC3).  Subject to the restrictions in E.4.1, the ac's may
     be used freely within the MACRO-10 procedure.

     If the procedure is a function, i e has a type, it may be
     used in an expression, which means that temporary results
     may exist in accumulators.  Thus the first parameter may be
     in some other ac than XWAC1, and the MACRO-10 procedure must
     be told where to find the first parameter.  This is done via
     AC2 (XTAC), which is loaded with the number of the first
     parameter ac.  XTAC may thus contain the number 3, 4, etc.
     For example, the first parameter may be loaded by
     MOVE   x,(XTAC), the second by MOVE   y,1(XTAC), assuming
     single length parameters.  When only a few parameters are
     involved, they may be loaded to standard ac's (XWAC1, XWAC2,
     etc) by EXCH instructions, at the same time saving the
     standard ac's.  Any extra registers must be saved on the
     stack (XPDP) before use.  On return, unstacking is followed
DECsystem-10 SIMULA Language Handbook, part II           Page 177
APPENDIX E.4  MACRO-10 CALLING STANDARD.


     by the same EXCH instructions in reverse order.

     If NOCHECK was specified, AC2 is used to specify the number
     of actual parameters as follows:
     The left half is -n, where n is the number of actual
     parameters.  The right half contains the number of the top
     ac as explained above.  AC2 is loaded also for pure
     procedures in this case.


     Exit from QUICK procedures

     On exit from a pure procedure, nothing is assumed about the
     contents of ac's except AC15 and AC17, which must be
     preserved.  On exit from a function, however, the following
     conditions must hold:
     - The result must be in the top ac, i e the one pointed to
     by XTAC on entry.  For double length results the next ac is
     also implied.
     - AC0, AC1, AC2 and AC16 may be destroyed.
     - The parameter ac's may be destroyed.
     - All other ac's must be preserved over the call.


     Restrictions

     Some restrictions are given in E.3.  Since intermediate
     results may exist in ac's, core allocation must be avoided.
     Procedures as parameters should be avoided.  Typical
     applications of QUICK procedures are:
     - Small procedures to give access to monitor information
     related to the current job, such as cpu time used, time of
     day, core available.
     - Additional text handling procedures, etc.
     Any complicated MACRO-10 procedure should be written as a
     CODE procedure.
DECsystem-10 SIMULA Language Handbook, part II           Page 178
APPENDIX E.5  STANDARD MACROS AND CONSTANTS IN MACSIM.


E.5  STANDARD MACROS


     To facilitate communication between SIMULA and MACRO-10
     programs, some macros and assembly-time constants are
     defined in the UNIVERSAL MACSIM.  They are:


             MACRO   SPECIFY(specifications)

     The argument of this macro is a list of specifications of
     the procedure and parameters.  As a result all parameters
     not called by NAME (and the function value) are directly
     accessible through their names.  Parameters called by NAME
     are operated on through the macros GETADD, GETTADD, GETAADD,
     GETVAL, ASSIGN, GETTYPE, GETKIND and SETTYPE.  SPECIFY may
     be used also for QUICK procedures if the macro QUICKPROC is
     invoked or the assembly parameter QUICK is defined > 0.


             MACRO   PROC    name,parameters

     This macro should be the first macro inside the SPECIFY
     argument.  It gives the name of the procedure and of the
     parameters.


             MACRO   VALUE     par1,par2...
             MACRO   NAME      par1,par2...
             MACRO   INTEGER   par1,par2...
             MACRO   REAL      par1,par2...
             MACRO   LONGREAL  par1,par2...
             MACRO   CHARACTER par1,par2...
             MACRO   BOOLEAN   par1,par2...
             MACRO   TEXT      par1,par2...
             MACRO   REF       par1,par2...
             MACRO   ARRAY     par1,par2...
             MACRO   PROCEDURE par1,par2...
             MACRO   LABEL     par1,par2...
             MACRO   SWITCH    par1,par2...

     These macros are valid as arguments to the SPECIFY macro.
     They specify the type, kind and mode of the parameters and
     of the procedure value.
DECsystem-10 SIMULA Language Handbook, part II           Page 179
APPENDIX E.5  STANDARD MACROS AND CONSTANTS IN MACSIM.


             MACRO   RETURN

     This macro returns control to the calling SIMULA program.


             MACRO   GETCHANNEL

     This macro expands into a call to a RTS-routine which
     reserves a free I/O-channel and returns it in AC1.  It is a
     type TA1 routine.


             MACRO   FREECHANNEL chan [,ac<16>]

     This macro returns the channel in location chan to the pool.
     ac is a temporary accumulator used by the macro.


             MACRO   INIMAGE

     This macro expands into a call to a RTS-routine which
     performs INIMAGE on the file object pointed to by AC3.  It
     is a type TA1 routine.


             MACRO   OUTIMAGE

     This macro expands into a call to a RTS-routine which
     performs OUTIMAGE on the file object pointed to by AC3.  It
     is a type TA1 routine.


             MACRO   IFEOF   ac

     This macro causes the next instruction to be skipped if
     ENDFILE=FALSE in the file object pointed to by ac.


             MACRO   IFNEOF  ac

     This macro causes the next instruction to be skipped if
     ENDFILE=TRUE in the file object pointed to by ac.
DECsystem-10 SIMULA Language Handbook, part II           Page 180
APPENDIX E.5  STANDARD MACROS AND CONSTANTS IN MACSIM.


     The following macros define access to name mode parameters.
     They should not be used in QUICK procedures.


             MACRO   GETADD  par [,N,maprh]

     This macro expands into a call to a RTS-routine which loads
     the dynamic address of a parameter called by NAME (not TEXT
     or ARRAY) to ac N+1 (AC3 if N is missing) (and ac N+2 (AC4)
     if double word).  N is the highest ac saved.  maprh is a
     list of those ac's which need relocation of their right
     halfword in case of garbage collection.  The left halfwords
     must not contain any relocatable information.  Thus the
     routine is of type TA3.


             MACRO   GETTADD par[,N,maprh]

     This macro expands into a call to a RTS-routine which loads
     the dynamic address of a TEXT parameter called by NAME.  For
     the rest see GETADD.


             MACRO   GETAADD par[,N,maprh]

     This macro expands into a call to a RTS-routine which loads
     the dynamic address of an ARRAY called by NAME.  It is the
     only way of accessing such a parameter.  For the rest see
     GETADD.


             MACRO   GETVAL  par[,N,maprh]

     This macro expands into a call to a RTS-routine which loads
     the value of a parameter called by name.  For the rest see
     GETADD.


             MACRO   ASSIGN  par,aclhs,acrhs

     This macro expands into a call to a RTS-routine which
     performs an assignment to a parameter called by NAME.  The
     dynamic address of the parameter has previously been
     computed to AC aclhs (and aclhs+1 if dynamic address is 2
     words).  The value to be assigned has been computed to AC
     acrhs (and acrhs+1 if doubleword value).  The SIMRTS-routine
     performs all necessary type conversion and qualification
     checking.  It is a type TA2 routine.
DECsystem-10 SIMULA Language Handbook, part II           Page 181
APPENDIX E.5  STANDARD MACROS AND CONSTANTS IN MACSIM.


             MACRO   GETTYPE ac,par

     This macro loads ac with the type of an actual parameter
     called by NAME.


             MACRO   GETKIND ac,par

     This macro loads ac with the kind of an actual parameter
     called by NAME.


             MACRO   SETTYPE typ,par[,ac<16>]

     This macro sets the formal type to typ for a parameter
     called by NAME.  It is used to force type conversion in
     GETVAL and ASSIGN.  ac is a temporary accumulator.


     The macros GETTYPE, GETKIND and SETTYPE are useful in
     NOCHECK procedures.


     The following macros can be used in procedures called with
     all parameters in ac's (QUICK procedures):

             MACRO   QUICKPROC

     This macro should be called directly after "search MACSIM"
     in a QUICK procedure.  It defines QUICK=1.




     Some useful constants:


             CONSTANT   QNOTYPE
             CONSTANT   QINTEGER
             CONSTANT   QREAL
             CONSTANT   QLONGREAL
             CONSTANT   QCHARACTER
             CONSTANT   QBOOLEAN
             CONSTANT   QTEXT
             CONSTANT   QREF
             CONSTANT   QLABEL

     These constants define the type codes.


             CONSTANT   QSIMPLE
DECsystem-10 SIMULA Language Handbook, part II           Page 182
APPENDIX E.5  STANDARD MACROS AND CONSTANTS IN MACSIM.


             CONSTANT   QARRAY
             CONSTANT   QCLASS
             CONSTANT   QPROCEDURE

     These constants define the kind codes.  SWITCH has type
     QLABEL and kind QPROCEDURE.


             CONSTANT   NONE

     This constant defines the representation of the object
     constant NONE.


             CONSTANT   IMAGE

     This constant defines the offset of the attribute IMAGE in a
     file object.
DECsystem-10 SIMULA Language Handbook, part II           Page 183
APPENDIX E.6  MACRO-10 PROGRAMMING EXAMPLES.


E.6  MACRO-10 PROGRAMMING EXAMPLES


E.6.1  Example on CODE procedures
       --------------------------

     In this example we have a MACRO-10 procedure which performs
     a summation utilizing Jensens device.


     The MACRO-10 code:

             TITLE   sum
             SEARCH  macsim
             ENTRY   sument

             SPECIFY<
                     PROC    sum,<from,upto,of,stepelement>
                     NAME    of,stepelement
                     REAL    sum,of
                     INTEGER from,upto,stepelement
                     >

     sument:

             MOVE    3,from

     loop:

             CAMLE   3,upto
             RETURN
             GETADD  stepelement,3
             ASSIGN  stepelement,4,3
             GETVAL  of,3
             FADRM   4,sum
             AOJA    3,loop
             END


     Note that the END statement must not contain any start
     address.  The ENTRY statement gives the start address of the
     procedure and the start address for the main program is
     created by the SIMULA compiler.
DECsystem-10 SIMULA Language Handbook, part II           Page 184
APPENDIX E.6  MACRO-10 PROGRAMMING EXAMPLES.


     The SIMULA specification program:

             OPTIONS(/E:CODE,CHECK,sument);
             REAL PROCEDURE sum(from,upto,of,stepelement);
             NAME of,stepelement;
             REAL of;
             INTEGER from,upto,stepelement;


     Then sum(1,n,i,i) = n*(n+1)/2 and sqrt(sum(1,n,a(i)**2,i)) =
     length of vector a


     The following monitor commands will compile and execute the
     modules in the example (assuming MACSIM.UNV is available on
     DSK:, UNV:  or SYS:):

     .compile/compile sum.sim
     .execute sum.mac,main

     Note that it is not possible to use the execute command
     directly as there is no rel file generated for the sum.sim
     file.




E.6.2  Example on QUICK procedures
       ---------------------------

     This example shows how a QUICK procedure is written to
     perform a text handling task.  Refer to B.1 for the text
     variable representation.  Note that MACSIM is used with the
     assembly parameter QUICK=1.  Since the text parameter is
     used also to return the result, the procedure name is not
     used.  The dot in the procedure name avoids name clashes.
     Note also that one file, e g REST.MAC, can be compiled both
     with SIMULA and MACRO-10 through use of the comment
     conventions.


     COMMENT !  SIMULA specification;

             OPTIONS(/EXTERN:QUICK,REST);
             TEXT PROCEDURE rest(t); TEXT t;
             COMMENT Computes t.sub(t.pos,t.length+1-pos);


     !;! MACRO-10 code ;!
             TITLE   REST
             SUBTTL  Compute text reference to text after pos
DECsystem-10 SIMULA Language Handbook, part II           Page 185
APPENDIX E.6  MACRO-10 PROGRAMMING EXAMPLES.


             SALL
             SEARCH  MACSIM
             ENTRY   REST
             QUICK==1
             SPECIFY<
             PROC    .REST,T
             TEXT    .REST,T
             >
     REST:   EXCH    T,(XTAC)        ;!Parameter to standard ac's
             EXCH    T+1,1(XTAC)
             HLRZ    X0,T+1          ;!Length
             SUBI    X0,(T+1)        ;! - pos + 1
             JUMPLE  X0,L1           ;!Anything left?
             HLRZ    X1,T            ;!Subtext offset
             ADDI    X1,(T+1)        ;! + pos - 1 gives
             HRLM    X1,T            ;!New offset
             HRLZM   X0,T+1          ;!New length, Pos=1
             GOTO    L2
     L1:     SETZB   T,T+1           ;!NOTEXT
     L2:     EXCH    T+1,1(XTAC)
             EXCH    T,(XTAC)
             RETURN
             END;


     REST could be called by the following piece of code:

     BEGIN
         EXTERNAL TEXT PROCEDURE rest;
         TEXT t1,t2;
         t1:-Copy("1234567");
         t1.setpos(5);
         t2:-rest(t1);
         Outtext("rest(t1)="); Outtext(t2); Outimage;
     END;


     The statement t2:-rest(t1) is compiled to:

             DMOVE   3,2(15) ;t1
             MOVEI   2,3     ;Indicate top ac=3
             PUSHJ   17,rest
             DMOVEM  3,4(15) ;t2


     The program output will be:

     rest(t1)=567
DECsystem-10 SIMULA Language Handbook, part II           Page 186
APPENDIX F RUN-TIME SYSTEM COMPONENTS


APPENDIX F RUN-TIME SYSTEM COMPONENTS
=====================================


     The Run-Time System contains several modules corresponding
     to files with extension MAC and the compiled REL files.  The
     most frequently used modules are loaded in the high segment,
     and the rest is loaded with the SIMULA program in the low
     segment.  In this appendix the modules are listed with their
     most important entry points, corresponding to system
     classes, procedures or special SIMULA constructs.

     The following modules are loaded in the high segment
     (SIMRTS).


     CP     handles classes and prefixed blocks.

            Subroutine          SIMULA notation

             .CPCA              CALL
             .CPDT              DETACH
             .CPNE              NEW <class identifier>
             .CPRS              RESUME


     CS     central part, handles some run-time tasks performed
            in most SIMULA programs.


     IO and IONF perform I/O handling.

            Subroutine          SIMULA notation

             .IOBO              BREAKOUTIMAGE
             .IOCL              CLOSE
             .IOEJ              EJECT
             .IOFD              FIELD
             .IOIG              INIMAGE
             .IOLI              LASTITEM
             .IOLP              LINES PER PAGE
             .IOLT              LOCATE
             .IOOG              OUTIMAGE
             .IOOP              OPEN
             .IOSP              SPACING
DECsystem-10 SIMULA Language Handbook, part II           Page 187
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     IOED   performs I/O handling in connection with text
            handling (editing functions)

            Subroutine          SIMULA notation

             .IOIC              INCHAR
             .IOIF              INFRAC
             .IOII              ININT
             .IOIR              INREAL
             .IOIT              INTEXT
             .IOOC              OUTCHAR
             .IOOF              OUTFRAC
             .IOOI              OUTINT
             .IOOR              OUTREAL
             .IOOT              OUTTEXT
             .IOOX              OUTFIX


     PH     handles parameter transmissions for procedures.


     OCIN and OCIO initialize a SIMULA program execution, handle
            file specifications.


     OCEP   handles end of SIMULA programs,traps and UUO's and
            loads SIMDDT


     SA     handles storage allocation, garbage collection.


     SIMRT1 and SIMRT2 contain transfer vectors for references to
            the high segment from the low segment and the code to
            swap high segments.  The modules are used in the two
            high segments version of the run time system.


     SIMRTS contains the transfer vector for references to the
            high segment from the low segment.  This module is
            used in the single high segment version of the run
            time system.


DECsystem-10 SIMULA Language Handbook, part II           Page 188
APPENDIX F RUN-TIME SYSTEM COMPONENTS


            TX and TXBL perform text handling.


            Subroutine          SIMULA notation

             .TXBL              BLANKS
             .TXCY              COPY
             .TXGC              GETCHAR
             .TXGF              GETFRAC
             .TXGI              GETINT
             .TXGR              GETREAL
             .TXLT              LOWTEN
             .TXMN              MAIN
             .TXPC              PUTCHAR
             .TXPF              PUTFRAC
             .TXPI              PUTINT
             .TXPR              PUTREAL
             .TXPX              PUTFIX
             .TXRE              Value relation (e.g. T1<=T2)
             .TXSE              SETPOS
             .TXST              STRIP
             .TXSU              SUB
             .TXVA              Value assignment (e.g. T1:=T2)




DECsystem-10 SIMULA Language Handbook, part II           Page 189
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     The following modules contain routines to be loaded into the
     low segment with the SIMULA program.  The corresponding rel
     files are collected by FUDGE2 into the library file
     SIMLIB.REL.  Some routines are taken from SYS:FORLIB.  These
     are marked with an asterisk (*).



     ACOS.  ARCCOSINE single precision

            subroutine          SIMULA name
            * ACOS.             ARCCOS


     ALOG.  contains logarithm function single precision.

            subroutine          SIMULA name
            * ALOG.             LN


     ASIN.  contains ARCSINE function single precision.

            subroutine          SIMULA name
            * ASIN.             ARCSIN


     ATAN.  contains ARCTANGENT single precision.

            subroutine          SIMULA name
            * ATAN.             ARCTAN


     COSH.  hyperbolic COSINE single precision

            subroutine          SIMULA name
            * COSH.             COSH


     DATAN. contains ARCTANGENT double precision

            subroutine          SIMULA name
            * DATAN.            ARCTAN


     DEXP.  contains exponential function double precision

            subroutine          SIMULA name
            * DEXP.             EXP


DECsystem-10 SIMULA Language Handbook, part II           Page 190
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     DEXP.2 computes a floating point number in double precision
            raised to an integer power.

            subroutine          SIMULA notation
            * DEXP2.            A**B


     DEXP.3 computes a floating point number in double precision
            raised to a floating point number in double
            precision.

            subroutine          SIMULA notation
            * DEXP.3            A**B


     DLOG.  logarithm function double precision.

            subroutines         SIMULA name
            * DLOG.             LN


     DSIN.  contains SINE and COSINE double precision

            subroutines         SIMULA name
            * DCOS.             COS
            * DSIN.             SIN


     DSQRT. computes square root double precision.

            subroutine          SIMULA name
            * DSQRT.            SQRT


     EXP.   exponential function single precision

            subroutine          SIMULA name
            * EXP.              EXP


     EXP1   calculates an integer raised to an integer power,
            single precision.

            subroutine          SIMULA notation
            * EXP1.             A**B


DECsystem-10 SIMULA Language Handbook, part II           Page 191
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     EXP2   calculates a floating point number raised to a fixed
            point power.

            subroutine          SIMULA notation
            * EXP2.             A**B


     EXP3   calculates a floating point number raised to a
            floating point power, single precision.

            subroutine          SIMULA name
            * EXP3.             A**B

     FORXIT handles FORTRAN interface

            subroutine
            * CEXIT.            used by F40 library subroutines


     MA     contains auxiliary mathematical subroutines.

            subroutines         function
             .MACI              convert from long real to integer
             .MACL              convert from integer to long real


     MAT    contains TANGENT single precision

            subroutine          SIMULA name
            TAN.                 TAN


     OCSP   sets up the environment for a SIMULA program, loads
            the (initial) high segment and passes control to
            OCIN.


     PHFO   handles interface between SIMULA and FORTRAN.


     PHPT   handles parameter transmission to formal, virtual and
            external MACRO-10 procedures.


DECsystem-10 SIMULA Language Handbook, part II           Page 192
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     RD     random drawing routines.

            subroutine          SIMULA name
             .RDDI              DISCRETE
             .RDDR              DRAW
             .RDER              ERLANG
             .RDHI              HISTD
             .RDHO              HISTO
             .RDLI              LINEAR
             .RDNE              NEGEXP
             .RDNO              NORMAL
             .RDPO              POISSON
             .RDRA              RANDINT
             .RDUN              UNIFORM


     SANE   allocates event notices for SIMULATION.


     SIN    contains routines to handle SINE and COSINE, single
            precision.

            subroutine          SIMULA name
            * COS.              COS
            * SIN.              SIN


     SINH   hyperbolic SINE function, single precision.

            subroutine          SIMULA name
            * SINH.             SINH


     SQRT   square root single precision

            subroutine          SIMULA name
            * SQRT.             SQRT


DECsystem-10 SIMULA Language Handbook, part II           Page 193
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     SS     implements SIMSET


            subroutine          SIMULA name
             .SSCA               CARDINAL
             .SSCL               CLEAR
             .SSEY               EMPTY
             .SSFO               FOLLOW
             .SSHD               HEAD
             .SSIT               INTO
             .SSLG               LINKAGE
             .SSLK               LINK
             .SSOU               OUT
             .SSPC               PRECEDE
             .SSPD               PRED
             .SSSC               SUC
             .SSST               SIMSET

     SU     implements SIMULATION.

            subroutine          SIMULA name
             .SUAC              ACTIVATE,REACTIVATE
             .SUAM              ACCUM
             .SUCA              CANCEL
             .SUEV              EVTIME
             .SUHO              HOLD
             .SUMA              MAIN PROGRAM
             .SUNE              NEXTEV
             .SUPA              PASSIVATE
             .SUPS              PROCESS
             .SUSI              SIMULATION
             .SUWA              WAIT


     TANH   hyperbolic TANGENT single precision.

            subroutine          SIMULA name
            * TANH.             TANH
DECsystem-10 SIMULA Language Handbook, part II           Page 194
APPENDIX F RUN-TIME SYSTEM COMPONENTS


     Run-Time module sizes (may be changed in the future).

            Modules             Size(octal)

            ACOS.               55
            ALOG.               111
            ASIN.               54
            ATAN.               66
            COSH.               45
            CP                  361
            CS                  652
            DATAN.              141
            DEXP.               163
            DEXP.3              62
            DLOG.               205
            DSIN.               211
            EXP.                74
            EXP2                143
            EXP3                111
            FORXIT              13
            IO                  1745
            IOED                317
            IONF                1504
            MA                  40
            MAT                 61
            OCEP                1310
            OCIN                3362
            OCIO                237
            OCSP                371
            PH                  321
            PHFO                300
            PHPT                562
            RD                  531
            SA                  2010
            SANE                67
            SIMRT1              276
            SIMRT2              276
            SIMRTS              202
            SIN.                113
            SINH.               74
            SQRT                56
            SS                  271
            SU                  671
            TANH.               63
            TX                  1621
            TXBL                305
DECsystem-10 SIMULA Language Handbook, part II           Page 195
APPENDIX G RESERVED SIMULA WORDS AND STANDARD IDENTIFIERS


APPENDIX G RESERVED SIMULA WORDS AND STANDARD IDENTIFIERS
=========================================================


     The following words are reserved SIMULA words and must not
     be used for other purposes.


               ACTIVATE            LE
               AFTER               LONG
               AND                 LT
               ARRAY               NAME
               AT                  NE
               BEFORE              NEW
               BEGIN               NONE
               BOOLEAN             NOT
               CHARACTER           NOTEXT
               CLASS               OR
               COMMENT             OPTIONS
               DELAY               OTHERWISE
               DO                  PRIOR
               ELSE                PROCEDURE
               END                 PROTECTED
               EQ                  QUA
               EQV                 REACTIVATE
               EXTERNAL            REAL
               FALSE               REF
               FOR                 SHORT
               GE                  STEP
               GO                  SWITCH
               GOTO                TEXT
               GT                  THEN
               HIDDEN              THIS
               IF                  TO
               IMP                 TRUE
               IN                  UNTIL
               INNER               VALUE
               INSPECT             VIRTUAL
               INTEGER             WHEN
               IS                  WHILE
               LABEL
DECsystem-10 SIMULA Language Handbook, part II           Page 196
APPENDIX G RESERVED SIMULA WORDS AND STANDARD IDENTIFIERS


     The following words are SIMULA standard identifiers and not
     reserved words, i.e.  they may be redeclared.


          ABS               HOLD              OUTREAL
          ACCUM             IDLE              OUTTEXT
          ARCCOS            IMAGE             PASSIVATE
          ARCSIN            INCHAR            POISSON
          ARCTAN            INFILE            POS
          BLANKS            INFRAC            PRECEDE
          BREAKOUTIMAGE     INIMAGE           PRED
          CALL              ININT             PREV
          CANCEL            INREAL            PRINTFILE
          CARDINAL          INTEXT            PROCESS
          CHAR              INTO              PUTCHAR
          CLEAR             LAST              PUTFIX
          CLOSE             LASTITEM          PUTFRAC
          COPY              LENGTH            PUTINT
          COS               LETTER            PUTREAL
          COSH              LINE              RANDINT
          CURRENT           LINEAR            RANK
          DETACH            LINESPERPAGE      RESUME
          DIGIT             LINK              SETPOS
          DIRECTFILE        LINKAGE           SIGN
          DISCRETE          LN                SIMSET
          DRAW              LOCATE            SIMULATION
          EJECT             LOCATION          SIN
          EMPTY             LOWTEN            SINH
          ENDFILE           MAIN              SPACING
          ENTIER            MOD               SQRT
          ERLANG            MORE              STRIP
          EVTIME            NEGEXP            SUB
          EXP               NEXTEV            SUC
          FIRST             NORMAL            SYSIN
          FOLLOW            OPEN              SYSOUT
          GETCHAR           OUT               TAN
          GETFRAC           OUTCHAR           TANH
          GETINT            OUTFILE           TERMINATED
          GETREAL           OUTFIX            TIME
          HEAD              OUTFRAC           UNIFORM
          HISTD             OUTIMAGE          WAIT
          HISTO             OUTINT
DECsystem-10 SIMULA Language Handbook, part II                Page 197
APPENDIX H  SAMPLE JOB LISTINGS


APPENDIX H SAMPLE JOB LISTINGS
==============================


H.1 THE R COMMAND
     The following command cause the system to input to the compiler
     the concatenation of two source files, SRC1.SIM and SRC2.SIM.
     The compiler produces object code in the file OBJECT.REL and
     LIST.LST contains a listing of the complete input file together
     with a cross reference table.

  .R SIMULA

  *OBJECT.REL,LIST.LST=SRC1/C,SRC2

  NO ERRORS DETECTED
  *SIMPRO/C/I

         8     OPTIONS(/H);
  SIM005  W LINE     8     HELP NOT VALID IN OPTIONS STATEMENT,
                           IGNORED
 
        17     LOOP:
        18     SYSUT.OUTTEXT("WHICH RECORD?");
  SIM362  E LINE    17     IDENTIFIER SYSUT IS NOT DECLARED 
        23    LOCATION(I);
  SIM337  E LINE    23     INCORRECT NUMBER OF PARAMETERS TO LOCATION 

  ERRORS DETECTED:
      1 TYPE W MESSAGES
      2 TYPE E MESSAGES

  *↑C
  .


     The last command to the compiler caused the source program
     SIMPRO.SIM to be compiled.  A cross reference listing was
     generated and named SIMPRO.LST and the created object code file
     was called SIMPRO.REL.  A line number table in the rel file was
     also generated.  The program contains errors and messages were
     output on the TTY.
DECsystem-10 SIMULA Language Handbook, part II                Page 198
APPENDIX H  SAMPLE JOB LISTINGS


H.2 THE COMPILE COMMAND
     To concatenate source files when using the COMPILE command, a
     + sign  should  be  used.   A cross reference listing of both
     source files, named SRC1.LST, will be created.

  .COMPILE/CREF SRC1+SRC2

  SIMULA:  SRC1

  EXIT

  .


H.3 THE LOAD COMMAND

     SIMPRO, the same source file  as  above,  is  compiled.   The  -W
     switch  suppresses the warning message.  The switch -A suppresses
     code for array bounds checking.  Switches  given in this  way  
     (via COMPIL) must not be separated by comma or slash.

  .LOAD SIMPRO(-W-A)

  SIMULA:  SIMPRO
   LOOP:
      SYSUT.OUTTEXT("WHICH RECORD?");
  SIM362  E LINE    17     IDENTIFIER SYSUT IS NOT DECLARED 
      LOCATION(I);
  SIM337  E LINE    23     INCORRECT NUMBER OF PARAMETERS TO LOCATION 

  ERRORS DETECTED:
      1 TYPE W MESSAGES
      2 TYPE E MESSAGES
  LINK:  Loading

  EXIT

  .
DECsystem-10 SIMULA Language Handbook, part II                Page 199
APPENDIX H  SAMPLE JOB LISTINGS


H.4 THE EXECUTE COMMAND

  .EXECUTE DF1A

  SIMULA:  DF1A
  LINK:  Loading
  [LNKXCT DF1A Execution]
  NUMBER OF RECORDS IN DF1.DAT =    49

  1 Garbage collection executed during 0 ms

  End of SIMULA program execution.
  CPU time: 1.45  Elapsed time: 7.84 

  .


H.5 THE DEBUG COMMAND

     The SIMULA compiler may also be invoked using the debug  command.
     For further examples on the use of SIMDDT see paragraph 9 of this
     appendix!

  .DEBUG DF1A

  SIMULA:  DF1A
  LINK:  Loading
  [LNKXCT DF1A Execution]
  SIMDDT STARTED 
  *P
  NUMBER OF RECORDS IN DF1.DAT =    49

  1 Garbage collection executed during 18 ms

  End of SIMULA program execution.
  CPU time: 1.41  Elapsed time: 3.60 

  .
DECsystem-10 SIMULA Language Handbook, part II                Page 200
APPENDIX H  SAMPLE JOB LISTINGS


H.6 CONTROL CARDS IN BATCH

     The $SIMULA card can be used if the SPRINT program (Spooling
     PRocessor for INpuT) is modified to recognize this control card.
     The general format of the $SIMULA card is:
     $SIMULA dev:prog.sim[PPN](SS...)/SW1/SW2.../SWn
     where
     (SS...) is processor switches in short notation
     /SW1/SW2.../SWn is the switches that control the mode of input
     interpretation and the listing of the compiled program.
     For a detailed description refer to 3.4.

     The example below illustrates how data can be input to a SIMULA
     program when the program is executing in the batch system.


  $JOB name [proj,prog]
  $PASSWORD:password
  $DECK SYSIN
  SYSIN ON DSK
  $EOD
  $SIMULA PROG.SIM(-WC)
  BEGIN
        SYSIN.IMAGE:-SYSOUT.IMAGE;
        INIMAGE;
        OUTIMAGE;
  END
  $EOD
  $EXECUTE
  *DEFAULT IS SYSIN FROM TTY
  .ASS DSK SYSIN
  $EXECUTE
  ;DSK:SYSIN created by the $DECK SYSIN card is read.
  .ASS CDR SYSIN
  $DATA
  SYSIN ON SPOOLED CDR
  $EOD
  ;The $DATA card will generate a funny named spooled CDR file.
  ;In this example SYSIN is used, but other files can be used in
  ;the same way.
  $EOJ


DECsystem-10 SIMULA Language Handbook, part II                Page 201
APPENDIX H  SAMPLE JOB LISTINGS


     When the file above on cards or on a disk file is input to SPRINT
     the following CTL file will be generated and submitted.


  .COMPIL /COMP/SIM DSK:PROG.SIM(-WC)/LIST
  .EXECUT /LINK/REL DSK:PROG.REL
  *DEFAULT IS SYSIN FROM TTY
  .ASS DSK SYSIN
  .EXECUT /LINK/REL DSK:PROG.REL
  ;DSK:SYSIN created by the $DECK SYSIN card is read
  .ASS CDR SYSIN
  .SET CDR TD9
  .EXECUT /LINK/REL DSK:PROG.REL
  ;The $DATA card will generate a funny named spooled CDR file.
  ;In this example SYSIN is used, but other files can be used in
  ;the same way.
  %FIN:: .DELETE DSK:TD9.CDR


     The job will produce the following log file:


  12:42:52 STDAT 16-OCT-74 QZ 601A7vm  SPRINT Version 1(634)
                 Running on DSK
  12:42:52 STCRD $JOB name [proj,prog]
  12:42:52 STERR %SPTEPF Extraneous Password Card Found - Ignored
  12:42:52 STCRD $DECK SYSIN
  12:42:52 STMSG File  DSK:SYSIN.  Created - 1 Cards Read - 
                1 Blocks Written
  12:42:52 STCRD $EOD
  12:42:52 STCRD $SIMULA PROG.SIM(-WC)
  12:42:53 STMSG File  DSK:PROG.SIM  Created - 5 Cards Read - 
                1 Blocks Written
  12:42:53 STCRD $EOD
  12:42:53 STCRD $EXECUTE
  12:42:53 STCRD $EXECUTE
  12:42:53 STCRD $DATA
  12:42:53 STMSG File  DSK:TD9.CDR  Created - 1 Cards Read - 
                1 Blocks Written
  12:42:53 STCRD $EOD
  12:42:53 STCRD $EOJ
  12:42:53 STSUM End of File After 26 Cards
  12:42:53 STSUM Batch Input Request Created
  12:42:58 BVERS  BATCON 10(107) INP: SUBJOB 01 OF 14
  12:42:58 BDATE  16-Oct-74
  12:42:58 BASUM  name[proj,prog] FOR **[proj,prog]
                 Log file in [proj,prog] 
                Request created at  12:42:55 16-Oct-74
                Unique: 2 Restart: 1
  12:42:58 MONTR  
  12:42:58 MONTR  .LOGIN proj/prog
DECsystem-10 SIMULA Language Handbook, part II                Page 202
APPENDIX H  SAMPLE JOB LISTINGS


  12:43:02 USER   JOB 18 QZ 601A7vm TTY76
  12:43:04 USER   Means left: -291607,50 Kr
  12:43:04 USER   [LGNJSP Other jobs same PPN]
  12:43:07 USER   1243 16-Oct-74 Wed
  12:43:12 USER   
  12:43:12 USER   QZ 601A7vm 12:43:08 TTY76
  12:43:12 USER   Job 18   User OWNER
  12:43:12 USER   .SET TIME 0
  12:43:12 MONTR  .SET TIME 300
  12:43:12 MONTR  
  12:43:12 MONTR  .SET SPOOL ALL
  12:43:13 MONTR  
  12:43:13 MONTR  ..COMPIL /COMP/SIM DSK:PROG.SIM(-WC)/LIST
  12:43:17 USER   
  12:43:17 USER   !!!! PRE-RELEASE VERSION !!!!
  12:43:17 USER   SIMULA:  PROG
  12:43:24 MONTR  
  12:43:24 MONTR  EXIT
  12:43:24 MONTR  
  12:43:24 MONTR  ..EXECUT /LINK/REL DSK:PROG.REL
  12:43:26 USER   LINK: Loading
  12:43:28 USER   [LNKXCT PROG Execution]
  12:43:29 USER   *DEFAULT IS SYSIN FROM TTY
  12:43:29 USER   DEFAULT IS SYSIN FROM TTY
  12:43:29 USER   
  12:43:29 USER   End of SIMULA program execution.
  12:43:29 USER   CPU time: 0.11 Elapsed time: 0.62 
  12:43:29 MONTR  
  12:43:29 MONTR  ..ASS DSK SYSIN
  12:43:29 MONTR  DSK assigned
  12:43:29 MONTR  
  12:43:29 MONTR  ..EXECUT /LINK/REL DSK:PROG.REL
  12:43:30 USER   LINK: Loading
  12:43:33 USER   [LNKXCT PROG Execution]
  12:43:33 USER   SYSIN ON DSK
  12:43:33 USER    
  12:43:33 USER   1 Garbage collection executed during 19 ms
  12:43:33 USER   
  12:43:33 USER   End of SIMULA program execution.
  12:43:33 USER   CPU time: 0.13 Elapsed time: 1.06 
  12:43:34 MONTR  
  12:43:34 MONTR  .
                ;DSK:SYSIN created by the $DECK SYSIN card is read
  12:43:34 MONTR  .ASS CDR SYSIN
  12:43:34 MONTR  %Logical name was in use, Spooled CDR assigned
  12:43:34 MONTR  
  12:43:34 MONTR  ..SET CDR TD9
  12:43:34 MONTR  
  12:43:34 MONTR  ..EXECUT /LINK/REL DSK:PROG.REL
  12:43:35 USER   LINK: Loading
  12:43:36 USER   [LNKXCT PROG Execution]
DECsystem-10 SIMULA Language Handbook, part II                Page 203
APPENDIX H  SAMPLE JOB LISTINGS


  12:43:37 USER   SYSIN ON SPOOLED CDR
  12:43:37 USER    
  12:43:37 USER   1 Garbage collection executed during 0 ms
  12:43:37 USER   
  12:43:37 USER   End of SIMULA program execution.
  12:43:37 USER   CPU time: 0.12 Elapsed time: 0.28 
  12:43:37 MONTR  
  12:43:37 MONTR  .
                ;The $DATA card will generate a funny named spooled
                 CDR file.
                ;In this example SYSIN is used, but other files can be
                 used in
                ;the same way.


  H.7 EXAMPLE OF CTL FILE IN BATCH

       The following CTL file was used:

   .execute df2a
   .execute df2d
   *5
   *000000
   *150
   *old end
   *160
   *new end
   *155
   *000000
   *-1


       The following LOG file was generated:
       (Only relevant parts of LOG file shown)

  14:39:15 MONTR  ..execute df2a
  14:39:22 USER   
  14:39:22 USER   SIMULA:  DF2A
  14:39:40 USER   LINK:   Loading
  14:39:40 USER   [LNKXCT DF2A Execution]
  14:39:53 USER   NUMBER OF RECORDS IN DF2.DAT =   150
  14:39:53 USER     
  14:39:53 USER   1 Garbage collection executed during 30 ms
  14:39:53 USER   
  14:39:53 USER   End of SIMULA program execution.
  14:39:53 USER   CPU time: 1.52   Elapsed time: 13.06 
  14:39:58 MONTR  
  14:39:58 MONTR  ..execute df2d
  14:40:00 USER   
  14:40:00 USER   SIMULA:  DF2D
  14:40:10 USER   LINK:   Loading
DECsystem-10 SIMULA Language Handbook, part II                Page 204
APPENDIX H  SAMPLE JOB LISTINGS


  14:40:10 USER   [LNKXCT DF2D Execution]
  14:40:10 USER   WHICH RECORD?
  14:40:10 USER   *5
  14:40:10 USER   OLD RECORD:
  14:40:10 USER   000153040110020
  14:40:10 USER   NEW RECORD:
  14:40:10 USER   *000000
  14:40:10 USER   WHICH RECORD?
  14:40:10 USER   *150
  14:40:10 USER   OLD RECORD:
  14:40:10 USER   001683100614210
  14:40:10 USER   NEW RECORD:
  14:40:10 USER   *old end
  14:40:11 USER   WHICH RECORD?
  14:40:11 USER   *160
  14:40:11 USER   OLD RECORD:
  14:40:11 USER   --NON-EXISTENT--
  14:40:11 USER   NEW RECORD:
  14:40:11 USER   *new end
  14:40:11 USER   WHICH RECORD?
  14:40:11 USER   *155
  14:40:11 USER   OLD RECORD:
  14:40:11 USER   /*
  14:40:11 USER   NEW RECORD:
  14:40:11 USER   *000000
  14:40:12 USER   WHICH RECORD?
  14:40:12 USER   *-1
  14:40:12 USER   END OF UPDATE
  14:40:12 USER     
  14:40:12 USER   1 Garbage collection executed during 11 ms
  14:40:12 USER   
  14:40:12 USER   End of SIMULA program execution.
  14:40:12 MONTR  CPU time: 0.26   Elapsed time: 2.66 
  14:40:12 MONTR  
  14:40:12 MONTR  .
DECsystem-10 SIMULA Language Handbook, part II                Page 205
APPENDIX H  SAMPLE JOB LISTINGS


  H.8 SOURCE CODE LISTING WITH ERRORS AND
             CROSS REFERENCE TABLE


     The first line of the header shows the version of the compiler
     and the creation date and time of the listing.  The second line
     contains information on the source text:  Name, PPN, creation
     date and time.  Text given in a PAGE switch will be added to the
     standard header.  The page number consists of a main number
     updated at form feeds in the source text and a secondary number
     updated at line overflow or PAGE switches.  The default value is
     55 lines per page including the header.  The BEGIN/END numbers
     are printed in the left margin.  If several BEGINs and/or ENDs
     appear on the same line, only the numbers of the first BEGIN and
     last END are printed.  Line numbers are provided if they are not
     present in the source text.  If there are faulty line numbers
     present they are replaced by correct ones.  An error message is
     inserted in the listing after the source code line to which it
     refers.  If a faulty statement covers more than one line the
     error message appears after the last faulty line.  If, on the
     other hand, there are several statements on a line the faulty one
     is marked like the one in line 22 below.
DECsystem-10 SIMULA Language Handbook, part II                Page 206
APPENDIX H  SAMPLE JOB LISTINGS


     SIMULA    1   2-OCT-1974  13:22             PAGE    1
     SIMPRO.SIM   [13,325]   2-OCT-1974  12:52  

     B1   1      BEGIN
          2 
          3 COMMENT  ***  DF2D         ***
          4    ***  THIS PROGRAM UPDATES  ***
          5    ***  RECORDS IN DF2.DAT    ***
          6 ;
          7 
          8    OPTIONS(/H);

     SIM005  W LINE     8     HELP NOT VALID IN OPTIONS STATEMENT,
                              IGNORED 

          9 
         10    REF(DIRECTFILE) FIL1;
         11    INTEGER  I;
         12    FIL1:-NEW DIRECTFILE("FIL1 DF2.DAT/I:15");
         13 
         14    INSPECT FIL1 DO
     B2  15        BEGIN
         16       OPEN(BLANKS(15));
         17    LOOP:
         18       SYSUT.OUTTEXT("WHICH RECORD?");

     SIM362  E LINE    17     IDENTIFIER SYSUT IS NOT DECLARED 

         19       SYSOUT.OUTIMAGE;
         20       SYSIN.INIMAGE;
         21       I:=SYSIN.ININT;
         22       IF I = -1 THEN GOTO 0VER;  LOCATION(I);

     SIM154  E LINE    22     MISSING BINARY OPERATOR 
     SIM362  E LINE    22     IDENTIFIER VER IS NOT DECLARED 
     SIM360  E LINE    22     INVALID OPERAND TYPE OF OPERATOR GOTO 
     SIM337  E LINE    22:1   INCORRECT NUMBER OF PARAMETERS TO
                              LOCATION 

         23       SYSOUT.OUTTEXT("OLD RECORD:"); SYSOUT.OUTIMAGE;
         24       IF ENDFILE THEN
         25          SYSOUT.OUTTEXT("--NON-EXISTENT--")
     B3  26           ELSE  BEGIN
         27          INIMAGE;
         28          SYSOUT.OUTTEXT(IMAGE.STRIP)
     E3  29              END;
         30       SYSOUT.OUTIMAGE;
         31       OUTTEXT(BLANKS(15));
         32       SETPOS(1);
         33       SYSOUT.OUTTEXT("NEW RECORD:");
DECsystem-10 SIMULA Language Handbook, part II                Page 207
APPENDIX H  SAMPLE JOB LISTINGS


     SIMULA    1   2-OCT-1974  13:22             PAGE   1-1
     SIMPRO.SIM   [13,325]   2-OCT-1974  12:52  

         34       SYSOUT.OUTIMAGE;
         35       SYSIN.INIMAGE;
         36       LOCATE(I);
         37       OUTTEXT(SYSIN.IMAGE.STRIP); OUTIMAGE;
         38       GOTO LOOP;
         39    OVER: CLOSE;
     E2  40        END;
         41    OUTTEXT("END OF UPDATE"); OUTIMAGE;
     E1  42     END


     DEFAULT SWITCHES USED


     ERRORS DETECTED:
         1 TYPE W MESSAGES
         5 TYPE E MESSAGES
DECsystem-10 SIMULA Language Handbook, part II                Page 208
APPENDIX H  SAMPLE JOB LISTINGS


     SIMULA    1   2-OCT-1974  13:22             PAGE    2
     SIMPRO.SIM   [13,325]   2-OCT-1974  12:52   CROSS REFERENCE TABLE


     BLANKS           16       31   
     CLOSE            39   
     DIRECTFILE       10       12   
     ENDFILE          24   
     FIL1             10D      12       14   
     I                11D      21       22M      36   
     IMAGE            28       37   
     INIMAGE          20       27       35   
     ININT            21   
     LOCATE           36   
     LOCATION         22   
     LOOP             17D      38   
     OPEN             16   
     OUTIMAGE         19       23       30       34       37       41
     OUTTEXT          18       23       25       28       31       33
                      37       41   
     OVER             39D  
     SETPOS           32   
     STRIP            28       37   
     SYSIN            20       21       35       37   
     SYSOUT           19       23M      25       28       30       33
                      34   
     SYSUT            18   
     VER              22   

     The cross reference table shows where identifiers  were  declared
     and used.  For each identifier the line numbers of all references
     are listed.  The line number may be  succeeded  by  one  or  more
     letters with the following meaning:

     D  line contains declaration
     E  external identifier
     M  more than one reference to same identifier on this line
DECsystem-10 SIMULA Language Handbook, part II                Page 209
APPENDIX H.9 SIMDDT EXAMPLES, PROGRAM LISTING


     SIMULA    1A(121)  30-SEP-1974  20:50     PAGE    1
     DEMDDT.SIM     [13,127]  27-SEP-1974  11:50
     B1     1   BEGIN  COMMENT simddt demonstration program;
            2       INTEGER indexb1;  REAL rb1;  BOOLEAN bb1;
            3       TEXT tb1;  TEXT ARRAY tab1[1:3];
            4   
            5       TEXT PROCEDURE p1(fip1);
            6       INTEGER fip1;
     B2     7       BEGIN
            8           p2("TYPE INPUT TEXT");
            9           p1:-Intext(fip1);
     E2    10       END p1;
           11 
           12       PROCEDURE p2(ftp2);
           13       VALUE ftp2; TEXT ftp2;
     B3    14       BEGIN
           15           Outtext(ftp2);
           16           Outimage;
     E3    17       END p2;
           18 
     B4    19       Simulation BEGIN
           20           INTEGER isb;  REF (pc) refpc;
           21 
           22           Process CLASS pc;
     B5    23           BEGIN
           24               INTEGER ipc;  LONG REAL lrpc;
           25               CHARACTER ARRAY chapc[-1:2,0:1];
           26 
           27               ls: ipc:=ipc+1;
           28               Hold (10);
           29               GOTO ls;
     E5    30           END of pc;
           31 
           32           p2("ENTER SIMULATION");
           33           isb:=10;
           34           refpc:-NEW pc;
           35           ACTIVATE refpc;
           36           REACTIVATE Current AT 100;
           37           INSPECT refpc DO
           38           lrpc:=-1;
           39           p2("EXIT SIMULATION");
     E4    40       END of simulation block;
           41   
           42       tb1:-p1(3);
           43       p2("PROGRAM IS LOOPING WHEN BB1 IS FALSE");
           44       l:IF NOT bb1 THEN GOTO l;
           45       p2("ERROR WHEN INDEXB1 IS 0");
           46       tab1[indexb1]:-tb1;
           47       p2("ERROR CORRECTED");
     E1    48   END of simddt demonstration program;
DECsystem-10 SIMULA Language Handbook, part II                Page 210
APPENDIX H.9 SIMDDT EXAMPLES, ERROR DETECTED


     ;in appendix H.9 all user input
     ;is given with lower case letters
     ;and the output from the system with
     ;upper case.
     ;
     ;Terminal dialogue, error is found
     .debug demddt/list
     LINK: Loading
     [LNKXCT DEMDDT Execution]
     SIMDDT STARTED 
     *; set breakpoints
     stop at 27 ,6 "6"
     *stop at 38 if ipc=isb
     *proceed
     ENTER SIMULATION
     STOP AT MAIN:27 "6    " ,6
     *scheduled
     SCHEDULED PROCESSES 
         EVTIME=  5.0000000E+01 PC O 022157  DETACHED MAIN:29
         EVTIME=  1.0000000E+02 MAINPROGRAM O 021517  DETACHED 
     *input chapc[0,1]:='c'
     *input  chapc[-1,0]:=' '
     *proceed
     STOP AT MAIN:38 IPC = 10
     *chain
     OPERATING CHAIN 
         PC O 022157  DETACHED MAIN:29 INSPECT BLOCK 
         PREFIXED BLOCK SIMULATION O 021502  DETACHED MAIN:37
     *output refpc.lrpc,chapc,isb
     REFPC.LRPC = 0
     CHAPC[-1:2,0:1]
         [-1,0] = CHAR 9 
         [0,1] = 'c'
     ISB = 10
     *proceed
     EXIT SIMULATION
     TYPE INPUT TEXT
     123
     PROGRAM IS LOOPING WHEN BB1 IS FALSE
     ↑C
     ↑C
     .reenter
     ZYD623 SIMDDT ENTERED, PROGRAM INTERRUPTED AT MAIN:43
     *input bb1:=true
     *input tab1[1]:-tb1
     *input tb1:="56"
     *proceed
      ... CONTINUING ...
     ERROR WHEN INDEXB1 IS 0
     ? ERROR IN JOB 10 AT  MAIN:46
     ZYQ002 ARRAY INDEX OUT OF BOUNDS 
DECsystem-10 SIMULA Language Handbook, part II                Page 211
APPENDIX H.9 SIMDDT EXAMPLES, ERROR DETECTED


     *variables
     VARIABLES 
     MAIN O 000243  DETACHED O 000000
         BB1 = TRUE
         TB1 == O 022132 LENGTH= 3 POS= 4 "56
         TAB1[1:3]
             [1] == O 022132 LENGTH= 3 POS= 4 "56
     INFILE O 021130  TERMINATED 
         IMAGE == O 021154 LENGTH= 72 POS= 4 "123
     PRINTFILE O 021175  TERMINATED 
         IMAGE == O 021224 LENGTH= 72 POS= 1 " 
     PREFIXED BLOCK SIMULATION O 021451  TERMINATED 
         ISB = 10
         REFPC == PC O 022101  DETACHED MAIN:29
         MAIN == MAINPROGRAM O 021466  DETACHED O 003350
     MAINPROGRAM O 021466  DETACHED O 003350
     PC O 022101  DETACHED MAIN:29
         IPC = 10
         LRPC = -1.000000000000000E+00
         CHAPC[-1:2,0:1]
             [-1,0] = CHAR 9 
             [0,1] = 'c'
     *exit
     1 Garbage collection executed during 17 ms
     End of SIMULA program execution.
     CPU time: 0.77 Elapsed time: 17.24 
     .
DECsystem-10 SIMULA Language Handbook, part II                Page 212
APPENDIX H.9 SIMDDT EXAMPLES, ERROR CORRECTED


     ;terminal dialogue, error is corrected
     ;
     .execute demddt
     LINK: Loading
     [LNKXCT DEMDDT Execution]
     ENTER SIMULATION
     EXIT SIMULATION
     TYPE INPUT TEXT
     ↑C
     .reenter
     190
     ZYD623 SIMDDT ENTERED, PROGRAM INTERRUPTED AT MAIN:9
     *; enter simddt via ↑C and reenter
     ; monitor commands, note that user input must
     ; be given before simddt can start
     input bb1:=true
     *input indexb1:=3
     *proceed
     PROGRAM IS LOOPING WHEN BB1 IS FALSE
     ERROR WHEN INDEXB1 IS 0
     ERROR CORRECTED
     End of SIMULA program execution.
     CPU time: 0.29 Elapsed time: 12.74 
     .continue
     ZYD623 SIMDDT ENTERED, PROGRAM INTERRUPTED AT MAIN:49
     *; enter simddt after normal program exit
     noarrays
     VARIABLES EXCEPT ARRAYS 
     ZYD632 GARBAGE COLLECTOR NOT CALLED BEFORE VARIABLES TYPED 
     MAIN O 000243  DETACHED O 000000
         INDEXB1 = 3
         BB1 = TRUE
     INFILE O 021130  TERMINATED 
         IMAGE == O 021154 LENGTH= 72 POS= 4 "190
     PRINTFILE O 021175  TERMINATED 
     PREFIXED BLOCK SIMULATION O 021502  TERMINATED 
         ISB = 10
         REFPC == PC O 022157  DETACHED MAIN:29
         MAIN == MAINPROGRAM O 021517  DETACHED O 003350
     MAINPROGRAM O 021517  DETACHED O 003350
     P2 O 022131  MAIN:33
         FTP2 == O 022142 LENGTH= 16 POS= 1 "ENTER SIMULATION"
     PC O 022157  DETACHED MAIN:29
         IPC = 10
         LRPC = -1.000000000000000E+00
     P2 O 022226  MAIN:40
         FTP2 == O 022237 LENGTH= 15 POS= 1 "EXIT SIMULATION"
     P1 O 022253  MAIN:42
         FIP1 = 3
     P2 O 022266  MAIN:9
         FTP2 == O 022277 LENGTH= 15 POS= 1 "TYPE INPUT TEXT"
DECsystem-10 SIMULA Language Handbook, part II                Page 213
APPENDIX H.9 SIMDDT EXAMPLES, ERROR CORRECTED


     P2 O 022315  MAIN:44
         FTP2 == O 022326 LENGTH= 36 POS= 1 "PROGRAM IS LOOPING
     WHEN BB1 IS FALSE"
     P2 O 022346  MAIN:46
         FTP2 == O 022357 LENGTH= 23 POS= 1 "ERROR WHEN INDEXB1
     IS 0"
     P2 O 022374  MAIN:48
         FTP2 == O 022405 LENGTH= 15 POS= 1 "ERROR CORRECTED"
     *↑C
     .
DECsystem-10 SIMULA Language Handbook, part II                Page 214
APPENDIX H.9 SIMDDT EXAMPLES, TRACING


     ;terminal dialogue, use simddt for tracing
     ;
     .load demddt
     LINK: Loading
     EXIT
     .save
     Job saved
     .reenter
     SIMDDT STARTED 
     *; use simddt for program tracing
     ; set breakpoints
     at 8 fip1
     *at 14 ftp2
     *at 28 if ipc<=4
     *at 39 ifchanged refpc.lrpc
     *stop at 43 if tb1 =/=notext
     *; direct simddt output to file
     use demtra.lst
     *; list the breakpoints
     breaks
     *proceed
     ENTER SIMULATION
     EXIT SIMULATION
     TYPE INPUT TEXT
     *111
     STOP AT MAIN:43 TB1 == O 022736 LENGTH= 3 POS= 4 "111"
     *output bb1,indexb1
     BB1 = FALSE
     INDEXB1 = 0
     *input bb1:=true
     *input indexb1:=2
     *proceed
     PROGRAM IS LOOPING WHEN BB1 IS FALSE
     ERROR WHEN INDEXB1 IS 0
     ERROR CORRECTED
     1 Garbage collection executed during 0 ms
     FILE: DEMTRA CLOSED AT TERMINATION
     End of SIMULA program execution.
     CPU time: 0.71 Elapsed time: 7.72 
     ;
     ;
     ;
     ;
     .type demtra.lst
     STOP AT MAIN:43 IF TB1 =/= NOTEXT
     AT MAIN:39 IFCHANGED REFPC.LRPC
     AT MAIN:28 IF IPC <= 4
     AT MAIN:15 FTP2
     AT MAIN:8 FIP1
      
     AT MAIN:15 FTP2 == O 022574 LENGTH= 16 POS= 1 "ENTER
DECsystem-10 SIMULA Language Handbook, part II                Page 215
APPENDIX H.9 SIMDDT EXAMPLES, TRACING


     SIMULATION"
     AT MAIN:28 IPC = 1
     AT MAIN:28 IPC = 2
     AT MAIN:28 IPC = 3
     AT MAIN:28 IPC = 4
     AT MAIN:39 REFPC.LRPC = -1.000000000000000E+00
     AT MAIN:15 FTP2 == O 022671 LENGTH= 15 POS= 1 "EXIT
     SIMULATION"
     AT MAIN:8 FIP1 = 3
     AT MAIN:15 FTP2 == O 022731 LENGTH= 15 POS= 1 "TYPE INPUT
     TEXT"
     STOP AT MAIN:43 TB1 == O 022736 LENGTH= 3 POS= 4 "111"
      
     BB1 = FALSE
     INDEXB1 = 0
      
     AT MAIN:15 FTP2 == O 022760 LENGTH= 36 POS= 1 "PROGRAM IS
     LOOPING WHEN BB1 IS FALSE"
     AT MAIN:15 FTP2 == O 023011 LENGTH= 23 POS= 1 "ERROR WHEN
     INDEXB1 IS 0"
     AT MAIN:15 FTP2 == O 023037 LENGTH= 15 POS= 1 "ERROR
     CORRECTED"
DECsystem-10 SIMULA Language Handbook, part II                Page 216
APPENDIX H.9 SIMDDT EXAMPLES, BATCH  


     .type demct4.ctl
     ;
     ;
     ;
     ;simula batch job with input
     ; data placed in the control file.
     ;demddb is equal to demddt with loop
     ; removed, lines 43 and 44 start with !.
     ;simddt will be called when the error is detected
     ; and when simddt requests input the batch control
     ; system will stop the execution (? in output) and
     ; start the monitor command after the 
     ; .if (noerror) batch command.
     ;the reenter command will cause simddt
     ; to continue where it was interrupted.
     .execute demddb
     *888
     *999
     .IF (NOERROR) .GOTO OK
     .REENTER
     *;simddt  will read the commands
     *;placed after the reenter monitor
     *;command.
     *output indexb1
     *exit
     OK::.


     .submit demct4.ctl
     ;
     ;
     ;
     ;
     ;terminal dialogue, run batch job
     ;
     .type demct4.log
     .
     .
     .
     20:27:24 MONTR  .
     20:27:24 MONTR  .execute demddb
     20:27:28 USER   
     20:27:29 USER   SIMULA:  DEMDDB
     20:27:35 USER   LINK: Loading
     20:27:37 USER   [LNKXCT DEMDDB Execution]
     20:27:40 USER   ENTER SIMULATION
     20:27:40 USER   EXIT SIMULATION
     20:27:40 USER   TYPE INPUT TEXT
     20:27:40 USER   *888
     20:27:44 USER   ERROR WHEN INDEXB1 IS 0
     20:27:44 USER   
DECsystem-10 SIMULA Language Handbook, part II                Page 217
APPENDIX H.9 SIMDDT EXAMPLES, BATCH  


     20:27:44 USER   ? ERROR IN JOB 13 AT  MAIN:46
     20:27:44 USER   ZYQ002 ARRAY INDEX OUT OF BOUNDS 
     20:27:44 USER   *
                     *999
     20:27:44 BATCH  .IF (NOERROR) .GOTO OK
     20:27:45 MONTR  .REENTER
     20:27:45 USER   
     20:27:45 USER    ... continuing ...
     20:27:45 USER   *;simddt  will read the commands
     20:27:47 USER   *;placed after the reenter monitor
     20:27:47 USER   *;command.
     20:27:47 USER   *output indexb1
     20:27:48 USER   0
     20:27:48 USER   **exit
     20:27:49 USER   
     20:27:49 USER   End of SIMULA program execution.
     20:27:49 USER   CPU time: 0.25 Elapsed time: 9.04 
     20:27:49 MONTR  
     20:27:49 MONTR  .
                     OK:
     20:27:50 MONTR  .


DECsystem-10 SIMULA Language Handbook, part II                Page 218
APPENDIX H.9 SIMDDT EXAMPLES, SEPARATE COMPILATION


     SIMULA    1A(121)  30-SEP-1974  20:50     PAGE    1
     p2.SIM [13,127]  25-SEP-1974  22:22 
       
           1   OPTIONS(/EXTERNAL);
           2  PROCEDURE p2(ftp2);
           3         VALUE ftp2; TEXT ftp2;
     B1    4         BEGIN
           5               Outtext(ftp2);
           6               Outimage;
     E1    7         END of p2;
      
     SWITCHES CHANGED FROM DEFAULT:
      
        E EXTERNAL CLASS/PROCEDURE
      
     NO ERRORS DETECTED





     SIMULA    1A(121)  30-SEP-1974  20:50     PAGE    1
     DEMDDE.SIM     [13,127]  27-SEP-1974  11:50
     B1     1   BEGIN  COMMENT simddt demonstration program;
            2       INTEGER indexb1;  REAL rb1;  BOOLEAN bb1;
            3       TEXT tb1;  TEXT ARRAY tab1[1:3];
            4   
            5       TEXT PROCEDURE p1(fip1);
            6       INTEGER fip1;
     B2     7       BEGIN
            8           p2("TYPE INPUT TEXT");
            9           p1:-Intext(fip1);
     E2    10       END p1;
           11 
           12       EXTERNAL PROCEDURE p2;
           13
           14
           15
           16
     E3    17
           18
     B3    19       Simulation BEGIN
     .
     .
     .
     .
DECsystem-10 SIMULA Language Handbook, part II                Page 219
APPENDIX H.9 SIMDDT EXAMPLES, SEPARATE COMPILATION


     ;terminal dialogue, separate compilation
     ; of simula modules.
     ;
     ;when no special switches are set (see next page)
     ;the extension of the first file in the debug
     ;command determines which debug system is used.
     ;
     ;
     ;
     .debug p2,demdde
     SIMULA:p2
     SIMULA:demdde
     LINK: Loading
     [LNKXCT DEMDDE Execution]
     SIMDDT STARTED 
     *;debugging external modules
     stop at p2:6
     *proceed
     STOP AT P2:6 
     *chain
     OPERATING CHAIN 
         P2 O 022137  MAIN:33
         PREFIXED BLOCK SIMULATION O 021510  DETACHED MAIN:20
     *remove at 6
     *stop at 42
      stop at 42
     ZYD637 INVALID LINE NUMBER 
     *stop at main:42
     *proceed
     ENTER SIMULATION
     EXIT SIMULATION
     STOP AT MAIN:42 
     *output bb1
     FALSE
     *exit
     End of SIMULA program execution.
     CPU time: 0.29 Elapsed time: 11.88 
     .
DECsystem-10 SIMULA Language Handbook, part II                Page 220
APPENDIX H.9 SIMDDT EXAMPLES, BOTH DDT AND SIMDDT


     ;terminal dialogue, use of both ddt and simddt
     ;
     .debug %"debug:ddt" demddt
     LINK: Loading
     [LINKDEB DDT Execution]
         
     $g
     simddt STARTED
     *stop at 7
     *proceed
     STOP AT MAIN:7
     *;exit SIMddt and enter DDT
     ↑C
     .ddt
     15/ 27030
     jrst 2,@.jbren$x
     ... CONTINUING ...
     ;simddt entered from ddt
     ;simddt still expecting command
     output bb1
     FALSE
     *;continue normal processing
     .
     .
     .
     .
DECsystem-10 SIMULA Language Handbook, part II                Page 221
APPENDIX I ERROR REPORT


APPENDIX I  ERROR REPORT
========================


     Software errors in the SIMULA system should be reported to
     SIMULA maintenance, Section 142, Swedish National Defence
     Research Institute, S-104 50 STOCKOLM 80, SWEDEN using the
     error report form on the next page (or a copy of it).

     The failing program and relevant input data (listings and,
     if necessary, convenient storage medium) should be submitted
     together with the report.  If the error can be isolated in a
     smaller and simpler program, this program should be
     submitted.

     If there has been any changes made to the SIMULA system at
     your installation, please indicate this on the error report
     and submit listings of changed software components with all
     modifications indicated.
DECsystem-10 SIMULA Language Handbook, part II                Page 222
APPENDIX I ERROR REPORT


                   DECsystem-10 SIMULA ERROR REPORT

------------------------------------------------------------------
 Send report to SIMULA maintenance, Section 142, Swedish National   
    Defence Research Institute, S-104 50, STOCKHOLM 80, SWEDEN.  
------------------------------------------------------------------
INSTALLATION:                                RELEASE NO:
CUSTOMER'S NAME:                             TELEPHONE:
ADDRESS:                                     YOUR REFERENCE:

ATTACHED TO THIS REPORT ARE:               COMPILATION LISTING []
TTY LISTING   []     SOURCE PROGRAM []     OBJECT PROGRAM      []
TEST MATERIAL []              OTHER []:

PLEASE INDICATE MODIFICATIONS TO THE SIMULA SYSTEM:
NO []     YES [] COMPONENTS:

PROBLEM DESCRIPTION:


















                                                     CONTINUED []
-----------------------------------------------------------------
                   For use by FOA/ENEA:           
-----------------------------------------------------------------
PROBLEM ANALYSIS:




CORRECTIVE ACTION TAKEN:                     DATE:




CORRECTED IN RELEASE NO:
DATE FOR CUSTOMER CONTACT:
-----------------------------------------------------------------
                !  !  !  !  !  !  !  PLEASE REFER TO THIS NUMBER
REGISTRATION NO !  !  !  !  !  !  !  IN FURTHER CORRESPONDENCE.
DECsystem-10 SIMULA Language Handbook, part II           Page 223
APPENDIX J PROGRAM MEASUREMENT SYSTEM


APPENDIX J:  PROGRAM MEASUREMENT SYSTEM.
=======================================

     If a SIMULA program has been developed which will be used
     very often, e.g.  as a part in a regularly used production
     system, it is often profitable to spend some efforts on
     optimization of the program.

     A central problem in program optimization is to find the
     innermost loops of the program, and this is often
     non-trivial.  Once the execution profile of a program is
     known it is usually easy to make it faster with a few
     changes such as modifications in processing algorithms or by
     using a small machine language subroutine.

     DEC-10 SIMULA is delivered with a frequency measurement
     system which assists in spotting frequently executed parts
     of a SIMULA program.  The system consists of two SIMULA
     programs, and as an indication of its usefulness serves the
     fact that when the first version of the system was applied
     to itself it was possible to double the speed of its largest
     program with less than two hours of analysis, recoding and
     testing.

     The system is used as follows:

     The program to be analyzed must have been tested well enough
     to run to normal completion.  It is read by the program
     FQCRED which produces two modified versions of it, one of
     which is a compilable SIMULA program and the other a listing
     later used to produce the frequency listing.  The modified
     compilable program is executed and produces, if normally
     terminated, a file of measured frequencies.  This file is
     merged with the listing output by FQCRED in the program
     FQCLST, which produces the final output.

     The measured program should satisfy some restrictions:

     i) A text constant should be contained in one line and it
     should not be longer than 72 characters, otherwise it will
     be truncated.

     ii) An end comment should not contain the character
     sequences END, ELSE, WHEN or OTHERWISE.

     iii) The program must not contain the identifier Z←Y←Q.

     iv) the program should not use a file on DSK:  named D or
     SYSTAT (if so, the file names must be changed by inputting
     specifications to FQCRED of D, to the modified program of
     SYSTAT and to FQCLST of D and SYSTAT).
DECsystem-10 SIMULA Language Handbook, part II           Page 224
APPENDIX J PROGRAM MEASUREMENT SYSTEM


     v) National letters $, # and @ should not be used in
     identifiers.

     vi) External classes used in the program will have to be
     recompiled with a higher block level (/E switch).



     The following session illustrates the use of the system on
     the SIMULA program FLOPY.SIM (lower case text supplied by
     user):


             .copy =flopy.sim/w      ;to remove tabs
             .ru fqcred      ;edits program to be measured
       ENTER FILE SPECIFICATIONS:
             *sysin dsk:flopy.sim
             *punch dsk:flop1.sim
             *
       EXECUTION STARTED
       End of SIMULA program execution.

             .ex flop1(-w)   ;execute modified program
       SIMULA:  FLOP1
       ERRORS DETECTED:
           1 TYPE W MESSAGES
       LINK:   Loading
       [LNKXCT FLOP1 Execution]
       End of SIMULA program execution.

             .ru fqclst              ;edit measurements
       ENTER FILE SPECIFICATIONS:
             *sysout dsk:flop1.lst
             *
       EXECUTION STARTED
       End of SIMULA program execution.

             .type flop1.lst              ;type result


               BEGIN COMMENT FREQUENCY MEASUREMENT EXAMPLE;
               INTEGER I,J,K;
               FOR I:=1 STEP 1 UNTIL 100 DO
            1    !1
               FOR J:=1 STEP I UNTIL 2*I DO
          100    !100
               IF I<J THEN K:=K+1 ELSE K:=K-1;
          200   !200       !100        !100
               END;

       ***MAX FREQUENCY: 200 ******SUM FREQUENCY: 501 ***
DECsystem-10 SIMULA Language Handbook, part II           Page 225
APPENDIX J PROGRAM MEASUREMENT SYSTEM


     The results shown above can be produced by submitting the
     .CTL file:

             .COPY =FLOPY.SIM/W      ;TO REMOVE TABS
             .RU FQCRED      ;EDITS PROGRAM TO BE MEASURED
             *SYSIN DSK:FLOPY.SIM
             *PUNCH DSK:FLOP1.SIM

             .EX FLOP1       ;EXECUTE MODIFIED PROGRAM
             .RU FQCLST              ; EDIT MEASUREMENTS
             *SYSOUT DSK:FLOP1.LST

             .TY FLOP1.LST           ;TYPE RESULT


     The program FQCRED can be used to produce an indented source
     version of a SIMULA program.  Precede the original source
     with two lines:

          %NOTRACE
          %INDENT=4

     After running FQCRED the indented program is on the file D.
DECsystem-10 SIMULA Language Handbook, part II           Page 226
APPENDIX K TECO, SOS OR EDITS ON SIMULA PROGRAMS


K.   USING TECO, SOS OR EDITS ON SIMULA PROGRAMS
     ===========================================



K.1  WHY LINE NUMBERED SIMULA SOURCE PROGRAMS?

     Run time error messages in SIMULA include the source program
     line number of the line at which the error occurred.  With
     the SIMULA debugging system(SIMDDT) you can set breakpoints
     at given lines in the source pogram.

     You can use SIMDDT without line numbered source programs.
     The SIMULA compiler will then number all lines in the source
     program seqentially from the beginning.  This numbering will
     be printed on source program listings produced by the
     compiler.

     However, every time you insert a new line into a source
     program, the numbers of all later lines will be changed.
     This means that you cannot always use a slightly old program
     listing to decide where to put your breakpoints or to find
     out at which line the error occurred.

     If you on the other hand use line numbered source files, the
     line number is incremented by 10 or more between successive
     lines.  This gives you the possibility to insert new lines
     into a source program without changing the line numbers of
     succeeding lines.  You can therefore use a slightly old
     program listing during debugging with SIMDDT.

     If you have a line numbered file with the line number
     incremented by 10 between succesive lines, you can even
     insert more than 9 new lines between two old lines with TECO
     and SIMULA.

     You can give the new lines blank line numbers.  The SIMULA
     compiler will then assign line numbers to the blank numbered
     lines during the compilation.

     The SIMULA compiler will increment the line number by 1
     until a source line is encountered which has a line number
     larger than that incremented by the SIMULA compiler.  If a
     file has three lines with the line numbers 140, 150 and 160,
     and fifteen blank numbered lines are put between line 140
     and 150, then the SIMULA compiler will assign the line
     numbers 141 to 155 to the new lines, and the line number 156
     to the line which on input had the line number 150.  Line
     160 and later lines in the source file will keep their
     original line numbers.

     The algorithm in the SIMULA compiler is to compare the line
     number in the source file(if any) with the previous line
     number incremented by 1, and assign the larger of the two
DECsystem-10 SIMULA Language Handbook, part II           Page 227
APPENDIX K TECO, SOS OR EDITS ON SIMULA PROGRAMS


     numbers to the line.

     You can also renumber the file yourself with TECO instead of
     using the automatic renumbering done by the SIMULA compiler.

     Example:

     File with fifteen inserted new lines between two old lines:
     00140   comment line before insertion;
             comment first inserted line with blank line number;
             comment second inserted line with blank line number;
      . . . etc . . .
             comment fifteenth inserted line;
     00150   comment line after insertion;
     00160   comment line after line after insertion;

     File as numbered by the SIMULA compiler:
     00140   comment line before insertion;
       141   comment first inserted line with blank line number;
       142   comment second inserted line with blank line number;
      . . . etc . . .
       155   comment fifteenth inserted line;
       156   comment line after insertion;
     00160   comment line after line after insertion;

     As you can see from the example above, only one line after
     the insertion had to be renumbered by the SIMULA compiler.
     All succeeding lines keep their old line numbers.


K.2  WHICH TEXT EDITOR SHOULD YOU USE?

     You may find it natural to use a line number oriented text
     editor like EDITS or SOS for line numbered files.  TECO has,
     however, the advantage of blank line numbers which means
     that there is no limit to the number of new lines you can
     insert between successive old lines in the file without
     renumbering the file.

     When using SOS or EDITS you often split a file into several
     pages, each with its own line sequencing.  When given such a
     file, however, the SIMULA compiler will have to renumber
     parts of pages with overlapping line numbers and this might
     cause a lot of warning messages.  To avoid this you are
     advised to resequence the file monotonically by using the
     NP-command of SOS or N-command of EDITS:
                   NP <step> ,/1:/*,M
     where    2<=   step   <=entier(99999/number of lines)
     If there are less than 650 lines in your file you may
     accordingly use the default step size of 100.  The step size
     must not be 1, because the page marks that EDITS or SOS
     inserts will be given line numbers by the SIMULA compiler
     and a step size of 1 would cause the rest of the file to be
     resequenced.
DECsystem-10 SIMULA Language Handbook, part II           Page 228
APPENDIX K TECO, SOS OR EDITS ON SIMULA PROGRAMS


     If you prefer to use TECO, you should read the rest of this
     appendix.


K.3  HOW TO GIVE A FILE NEW LINE NUMBERS WITH TECO

     If you want to put line numbers on a previously unnumbered
     file, or if you want to resequence a file with new line
     numbers with the increment 10 between succeeding lines, then
     you should use the switch GENLSN with the .TECO or EB
     commands.

     Example:

     TECO simprg.sim/genlsn

     R TECO
     EBsimprg.sim/genlsn$y$$


K.4  EDITING A LINE NUMBERED FILE WITH TECO

     Editing a line numbered file is very similar to editing a
     file without line numbers.  You only have to remember that
     each line begins with a line number.  This line number is
     either five digits followed by a TAB or five spaces followed
     by a TAB.

     When you insert new lines into a file, you need not give
     them any line number.  TECO will automatically give them a
     line number of five spaces and a TAB when the file is output
     on disk.

     If you wish, you can give new lines explicit line numbers by
     inserting the new line number, followed by a tab, into the
     beginning of the new line.

     Example:

     File before editing:
     00140   Comment line before insertion;
     00150   Comment line after insertion;

     to insert a new line with blank line number you can write:
     s00150$0licomment new line to get a blank line number;$$

     to insert a new line with the line number 145 you can write:
     s00150$0li145   comment new line with line number and TAB;$$

     If you want a new line to begin with five or less spaces or
     digits followed by a TAB, but you do not want these to be
     interpreted by TECO as line numbers, then just insert five
     spaces and a TAB first in the line in front of the text
     which you do not want TECO to interpret as a line number.
DECsystem-10 SIMULA Language Handbook, part II           Page 229
APPENDIX K TECO, SOS OR EDITS ON SIMULA PROGRAMS


     APPENDIX L AUTOMATIC EDITING OF SIMULA PROGRAMS
     ===============================================


     The SIMED program converts SIMULA source program files.  The
     program is able to indent the program (for better
     readability) and convert reserved words, standard and user
     indentifiers to 1) UPPER CASE 2) lower case 3) Edit Case
     (1st char.  upper case).

     N.B.  Input file must NOT contain line numbers, please
     remove line numbers (.COPY =X.SIM(N) ) before processing.

     Lines which become too long at indentation are split at an
     appropriate position.  In the case where no proper split can
     be done (long text constants for example) a warning message
     is issued.  

     The following information is requested from the user:-
     (?  rather than "help" gives info at run time) 


     1.  The file name for the source program file.

     2.  The name of the output file (default is input file
     name).

     3.  The maximal record line length for output.

     4.  Number of positions at indentation for each
         block/compound statement (=BEGIN).
         If a negative value is entered existing blanks and
         tabs at the beginning of lines will be kept (default=4).

     5.  Enter the maximal position at indentation.  If the
         nesting of BEGINs is too deep the value will be taken
         modulo the entered value (default=60).

     6.  Enter Yes if tabs may be used at indentation, otherwise
         No (default=Yes).

     7.  Enter conversion mode for reserved words (default=1).

     8.  Ditto standard identifiers (default=3).

     9.  Ditto user identifiers (default=2).

     10.  Ditto comments and option statements (default=0).

     11.  Ditto text constants (default=0).  
DECsystem-10 SIMULA Language Handbook, part II           Page 230
APPENDIX L AUTOMATIC EDITING OF SIMULA PROGRAMS


     You will get the default answers for all the questions no.
     2-11 if you respond with <CR><LF>.

     N.B.  Split lines will not be indented properly if they
     contain BEGIN or END.  However split text constants will not
     be indented.
     Numerical constants containing blanks or tabs may
     occasionally be improperly split.

     Required data file:

     SIMED.DAT (reserved words and standard identifiers).
DECsystem-10 SIMULA Language Handbook, part II           Page 231
APPENDIX M CONVERSION OF SIMULA PROGRAMS


     APPENDIX M CONVERSION OF SIMULA PROGRAMS
     ========================================


M.1 CONVERSION FROM IBM 360/370 SIMULA TO DEC SYSTEM-10 SIMULA

M.1.1 WHAT IS DONE BY THE IBMSIM PROGRAM

     The program IBMSIM can be used to perform the following
     conversion tasks:

   > Change the IBM source input control records like %PAGE,
     %TITLE, %SOURCE etc.  to their DEC 10 equivalents.

   > Eliminate IBM source control cards %(NO)LIST, %INDENT=n and
     %(NO)RESWD etc.  In order to indent your program, use the
     SIMED program (see appendix L) afterwards.

   > Convert long real constants to DEC 10 format.

   > Issue a warning if numerical constants are out of range.

   > Eliminate card sequence numbers if present.


M.1.2 WHAT IS NOT CONSIDERED BY THE IBMSIM PROGRAM

   > Conversion of hexadecimal constants to DEC 10 format.

   > IBM file names longer than six characters will not be unique
     if the first parts of two of more filenames are equal.

   > Maximal number of subscripts is 10 on DEC 10 and 127 on IBM.

   > Virtual quantities may may only be of the types defined in
     the COMMON BASE:  LABEL, SWITCH or PROCEDURE.  This problem
     is due to the extension of the IBM system and could often be
     overcome by the use of virtual type procedures.

   > Subscript checking is done for each element separately in
     the DEC 10 SIMULA system.  In IBM only the resulting index
     is checked.

   > The standard procedures RANK and CHAR return different
     results due to different collating sequences.  However,
     programs could often be written to be independent of this
     effect.

   > The facilities for creating and using EXTERNAL modules are
     much more powerful on DEC 10.
DECsystem-10 SIMULA Language Handbook, part II           Page 232
APPENDIX M CONVERSION OF SIMULA PROGRAMS


   > Some of the mathematical standard procedures are not
     supplied in double precision in the first DEC 10 SIMULA
     release.  (The compiler will warn you in such cases.)

   > The maximum floating point number is approx.  1.7&+38, while
     for IBM it is about &+75.  A warning will be issued if the
     program contains real constants out of range.

   > The input file must not contain line numbers.
DECsystem-10 SIMULA Language Handbook, part II           Page 233
APPENDIX M CONVERSION OF SIMULA PROGRAMS


M.2 CONVERSION FROM DEC SYSTEM-10 TO IBM 360/370 SIMULA

M.2.1 WHAT IS DONE BY THE SIMIBM PROGRAM

     The program SIMIBM can be used to perform the following
     conversion tasks:

   > All lower case letters are translated to upper case.

   > Long real numerical constants are converted to IBM format.

   > All calls to standard procedure BREAKOUTIMAGE are replaced
     with OUTIMAGE.

   > The special COMMENT symbol '!' is converted to "COMMENT ".

   > The exponentiation symbol '↑' is converted to "**".

   > All square brackets are converted to parentheses.

   > All lines longer than 72 characters are split.  The program
     tries to split the line at an appropriate position.
     However, numerical constants containing blanks or tabs could
     occasionally be improperly split.

   > The NOT symbol '\' and the NOT-EQUAL symbol '\=' are
     converted to NOT and NE respectively.

   > All tabs are translated to blank(s).

   > OPTIONS is translated to COMMENT.

M.2.2 WHAT IS NOT DONE BY THE SIMIBM PROGRAM

   > External declarations must be removed before processing.
     Use the SIMEXP program before running SIMIBM.

   > The input file must not contain line numbers.
DECsystem-10 SIMULA Language Handbook, part II           Page 234
APPENDIX M CONVERSION OF SIMULA PROGRAMS


M.3  CONVERSION FROM CDC SIMULA TO DEC SYSTEM-10 SIMULA

M.3.1 WHAT IS DONE BY THE CDCSIM PROGRAM

     The program CDCSIM can be used to perform the following
     conversion tasks:

   > Change characters from the CDC to the ASCII character set.

   > Change certain SIMULA words which are differently spelled on
     CDC and DEC (e.g.  "POWER" to "**", ".," to ";").

   > Find CDC identifiers longer than 12 characters, which are
     different but equal in their first 12 characters, and rename
     a few characters in one of them since only the first 12
     characters are significant on DEC SIMULA.

   > Rename identifiers which are reserved words on DEC but not
     on CDC (e.g.  ELSE or THEN).

   > Remove the "@" characters surrounding operator words on CDC.

   > Optionally change CDC REAL variables and constants to
     DECsystem-10 LONG REAL, because of the smaller precision of
     REAL on the DECsystem-10.

   > Remove blanks inside identifiers.

M.3.2 WHAT IS NOT DONE BY THE CDCSIM PROGRAM

     Here is an incomplete list of things not done by the CDCSIM
     program:

   > Conversion of TEXT and CHARACTER constants.

   > Conversion of COMMENTS.

   > Conversion of the format of declarations of external FORTRAN
     and ASSEMBLY procedures.

   > Conversion because RANK and CHAR work differently with the
     CDC and the ASCII character codes.

M.3.3 PROBLEMS WHICH MAY OCCUR

     You may have trouble with multi-line text constants in some
     special cases.

     Since the conversion of the CDCSIM program from IBM to DEC
     SIMULA, it has only been tested on one very large CDC
     program, which program however was converted correctly.
DECsystem-10 SIMULA Language Handbook, part II           Page 235
APPENDIX M CONVERSION OF SIMULA PROGRAMS


     CDCSIM has however been tested very thoroughly on many IBM
     SIMULA installations before conversion to DEC.

M.3.4 HOW TO USE THE CDCSIM PROGRAM

     Just run the program and answer the questions put to you.
     The program will ask for:
   > File name for input CDC program and output DEC program.
   > If you want to list the output program on the TTY.
   > If you want the program to modify long identifiers to avoid
     name clashes.
   > If you want to modify yourself the first 8 characters of
     such clashing identifiers.

     The program will use default values for all input parameters
     except the file name of the CDC program.  Help is available
     by answering ?  to the questions given by the program.

     If you modify long identifiers, then the program will
     produce a temporary file TEMP.TMP.

     The program also has a facility to convert from UNIVAC to
     IBM SIMULA, but this facility has not been tested on DEC.
     The facility is triggered by a line "%CON" in the input
     file.

M.3.5 ACKNOWLEDGEMENT

     CDCSIM was originally produced by the Norwegian Computing
     Center for converting UNIVAC and CDC SIMULA programs to IBM.
     We are very grateful for their permission to modify it for
     CDC to DEC conversion.
DECsystem-10 SIMULA Language Handbook, part II           Page 236
APPENDIX N, THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY





APPENDIX N:  THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY
====================================================


     The intention is to include in this library utility programs
     of general interest to users of SIMULA on the DECsystem-10.
     Examples:
   > Programs for editing and generating SIMULA source programs.
   > Useful program packages written in SIMULA such as data base
     packages, graphic packages, conversational i/o packages.
   > Useful MACRO 10 programs to be called from SIMULA, e.g. for
     object and binary i/o, access to monitor facilities like the
     clock.

     The programs in the library will be distributed through the
     DECUS library, either as separate programs or on the SIMULA
     distribution tape.

     Anyone who has submitted a program to the DECUS library,
     such that the program is also suitable for inclusion in the
     SIMULA program library, is invited to send us a copy of the
     program and its documentation.  If we accept the program, we
     will include it in future releases of this appendix.


M.1 CONVERSION OF SIMULA SOURCE PROGRAM FILES

SIMED is a program to convert SIMULA source programs to a more
     readable format.  The block structure is indicated by
     indentation and reserved words are capitalized to
     distinguish them from other identifiers.  SIMED is described
     further in Appendix L of this handbook.  SIMED is
     distributed as four files, SIMED.SIM, SIMED.DAT, SIMED.HLP
     and SIMED.SAV.
     Written by Mats Ohlin, Swedish National Defense Research
     Institute.

IBMSIM is a program to convert SIMULA source programs from IBM
     360/370 to DECsystem-10.  The program is described in
     Appendix M.1 of this handbook.  IBMSIM is distributed as
     three files, IBMSIM.SIM, IBMSIM.HLP and IBMSIM.SAV.
     Written by Mats Ohlin, Swedish National Defense Research
     Institute.

SIMIBM is a program to convert SIMULA source programs from
     DECsystem-10 to IBM 360/370.  The program is described in
     Appendix M.2 of this handbook.  SIMIBM is distributed as
     three files, SIMIBM.SIM, SIMIBM.HLP and SIMIBM.SAV.
DECsystem-10 SIMULA Language Handbook, part II           Page 237
APPENDIX N, THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY


     Written by Mats Ohlin, Swedish National Defense Research
     Institute.

CDCSIM is a program to convert SIMULA source programs from CDC to
     DECsystem-10.  The program is described in Appendix M.3 of
     this handbook.  CDCSIM is distributed as two files,
     CDCSIM.SIM and CDCSIM.SAV.

     Originally produced at the Norwegian Computing Center,
     modified by Lars Enderin and Jacob Palme at the Swedish
     National Defense Research Institute.

SIMEXP is a program to merge a SIMULA source program containing
     separately compiled segments into one single segment.  This
     is necessary to use the program measurement system FQC and
     sometimes necessary when moving SIMULA programs from the
     DECsystem-10 to other computers.  SIMEXP is described in
     SIMEXP.HLP and distributed as SIMEXP.SIM and SIMEXP.SAV.
     Written by Mats Ohlin, Swedish National Defense Research
     Institute.

FQC is a program to measure the frequency with which the
     statements in a SIMULA program are executed.  FQC is
     described in Appendix J in this handbook.  FQC is
     distributed as FQCRED.SIM, FQCRED.SAV, FQCLST.SIM,
     FQCLST.SAV.
     Written by Stefan Arnborg, Swedish National Defense Research
     Institute.


N.2 EXTERNAL CLASSES WRITTEN IN SIMULA

SAFEIO is a package to enable a safe question-and-answer dialogue
     with a conversational terminal.  The programs in the package
     allow you to ask the user for variables of various SIMULA
     types.  The user answers are checked for correct type and
     for acceptance according to criteria specified by the
     programmer.  Help and error messages are given.  The package
     protects from error interrupts in programs which may receive
     faulty input data from the user.  The user may save his
     input in a log file.  This file can later be used as input
     instead of the tty.  Other files may also be used as input,
     intermixed with tty input.  SAFEIO is distributed as the
     files SAFEIO.SIM, SAFEI.SIM, SAFE.SIM, SAFEIO.MAN,
     SAFEIO.ENG, SAFEI.ENG and SAFEIO.HLP.
     Written by Mats Ohlin, Swedish National Defense Research
     Institute.

STORE is a simple text oriented data base handler providing two
     main procedures PUTMESSAGE and GETMESSAGE.  PUTMESSAGE
     stores a message under a key in a direct access file, and
DECsystem-10 SIMULA Language Handbook, part II           Page 238
APPENDIX N, THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY


     GETMESSAGE returns the message stored under a given key.
     Both key and message can be text strings of arbitrary
     length.  STORE is distributed as the files STORE.SIM,
     STORE.RNO, STORE.HLP and STOREU.SIM.  STORE.RNO is STORE.HLP
     in RUNOFF format.  STOREU.SIM is an application example
     which also uses the SAFEIO package.
     Written by Jacob Palme, Swedish National Defense Research
     Institute.

FIGURE is a basic graphic package for handling TEKTRONIX graphic
     terminals in SIMULA.  FIGURE is described in the help file
     FIGURE.HLP and the programs are contained in the files
     COSYS.SIM, COSYSF.SIM, FIGURE.HLP, FIGURE.SIM, GETCH.ATR,
     GETCH.MAC, GETCH.REL, GRAPH.SIM, RUBOUT.ATR, RUBOUT.MAC,
     RUBOUT.REL.
     Written by Aake Blomberg, Swedish National Defense Research
     Institute.


N.3 NOT SIMULA WRITEABLE EXTERNAL ASSEMBLER (MACRO-10) PROCEDURES

TRMOP allows the SIMULA program to test and change the values of
     certain status items associated with a terminal connected to
     the SIMULA program via a file object.  The program can thus
     achieve the equivalents of the monitor commands .TTY NO
     ECHO, .TTY LC etc.

     INTEGER PROCEDURE trmop(funcod, iox, val);
     INTEGER funcod, val;  REF (Outfile) iox;

     Funcod is the four-digit octal code for the function to be
     performed.
     A first digit = 0 signifies a special function (usually a
     generalization of the TTCALL UUO for the job-controlling
     terminal).
     If the first digit is 1, a read function is performed, i. e.
     the current value of the field is returned as function
     value.
     If the first digit is 2, the corresponding value is set to
     the value given by val, and the old value is returned as
     function value.
     The effect of other values of the first digit is
     installation dependent.
     If the requested function cannot be performed, the value of
     the TRMOP function is -1.

     Iox is an outfile referring to the TTY involved.  Iox==NONE
     refers to the terminal controlling the job.

     Val is the new value for the status item.  Redundant except
     for set function (funcod=8R2xxx).
DECsystem-10 SIMULA Language Handbook, part II           Page 239
APPENDIX N, THE DEC SYSTEM-10 SIMULA PROGRAM LIBRARY


     Trmop returns the old value of the status item when
     relevant.
     Special case:  for funcod = 1 or 2, a skip return is mapped
     as the function value 1, non-skip return as 0.

     Example I:  "trmop(8R1003,sysout,0)" returns 1 if the
     previous setting was "TTY NO LC", returns 0 if the previous
     setting was "TTY LC".  (TTY NO LC means that the monitor
     converts all lower case letters to upper case in
     transmissions from the conversational terminal.)

     Example II:  "trmop(8R2003,sysout,1)" is equivalent to the
     monitor command "TTY NO LC".

     All the status items which can be interrogated or set by
     trmop are listed in the DECsystem-10 Software Notebooks,
     "DECsystem-10 monitor calls", section 5.10.7.  Here is an
     excerpt of the most useful items:

     funcod  value
     8R1003  1 = NO LC (lower case)
     8R1006  0 = NO TAB (tabs converted to multiple spaces)
     8R1007  1 = NO ECHO (printable characters not echoed)
     8R1010  1 = NO CRLF (monitor inserts no extra CR-LFs)
     8R1011  Horizontal position of carriage
     8R1012  Carriage width (TTY WIDTH)
     8R1013  1 = NO GAG (accepts external messages)
     8R1017  TTY FILL (filler class index, governs number of fill
             chars after FF and CR)
     8R1024  Number of lines output on this page
     8R1026  0 = ASCII codes 175 and 176 converted to altmode
DECsystem-10 SIMULA Language Handbook, part II           Page 240
APPENDIX O DUMP OF GENERATED CODE


     APPENDIX O DUMP OF CODE GENERATED BY THE SIMULA COMPILER
     ========================================================



     ;The simula compiler does not contain any
     ;built-in routine for generating a Macro 10
     ;listing of the generated code.
     ;It is possible to get such a listing with the
     ;help of the monitor command DUMP (or the DUMP program).
     ;You need a program listing with the
     ;line number table (Y switch set on
     ;during compilation) and a link map listing.
     ;
     ;
     .load /map simcod(ly)
     SIMULA: SIMCOD
     LINK: Loading
     EXIT
     .save
     Job saved
     .type simcod.lst

     SIMULA    1A(121)   1-OCT-1974  17:40     PAGE    1
     SIMCOD.SIM [13,127]   1-OCT-1974  17:35 

     B1          1 BEGIN
                 2     INTEGER ARRAY a[1:2];
                 3     PROCEDURE p;;
                 4     a[1]:=a[1]+1;
                 5     p;
     E1          6 END

     DEFAULT SWITCHES USED

     NO ERRORS DETECTED


     SIMULA    1A(121)   1-OCT-1974  17:40     PAGE    2
     SIMCOD.SIM [13,127]   1-OCT-1974  17:35  LINE NUMBER TABLE

     0  000052
     1  000060
     2  000062
     3  000067
     3  000070
     4  000071
     5  000100
     6  000102
     7  000104
DECsystem-10 SIMULA Language Handbook, part II           Page 241
APPENDIX O DUMP OF GENERATED CODE


     .type simcod.map


              LINK-10 symbol map of SIMCOD  page 1
             Produced by LINK-10 version 1B(131) on  1-Oct-74

     Low  segment starts at  0 ends at 710 length 711 = 1P
             Start address is    212, located in program .MAIN
         
              *************
     JOBDAT-INITIAL-SYMBOLS
             Zero length module
              *************

     .MAIN   from DSK:SIMCOD.REL[13,127] created by SIMULA /KI10
             Low  segment starts at 140 ends at 363 length 224 

             .MAIN          212 Global symbol Relocatable 
             .MAINL         313 Global symbol Relocatable 
              *************
     OCSP    from SYS:SIMLIB.REL[1,4]
     .
     .
     ;Suppose that you want to get a listing of the
     ;code generated from statements in lines 4-6 in the
     ;simcod program. Then look at the line number table
     ;entries for these lines and also at the LINK-10 map
     ; for the program, where you find the .MAIN module 
     ;start address which is usually 140.
     ;Line 4 starts at address 000071 and
     ;line 6 ends at 000103.
     .get simcod
     Job setup

     .dump /OUT:TTY:/MODE:SYM/WIDTH:30/JUSTIFY:L/IRADIX:8
      /d [(140+71) & (140+103)

     231/    MOVE   5,2(15)                
     232/    MOVEI  6,1                    
     233/    CAML   6,4(5)                 
     234/    CAMLE  6,5(5)                 
     235/    UUO001 2                      
     236/    ADD    6,2(5)                 
     237/    AOS    3,(6)                  
     240/    MOVEI  1,251                  
     241/    PUSHJ  17,400011              
     242/    MOVEI  1,                     
     243/    DPB    1,143                  

     EXIT
DECsystem-10 SIMULA Language Handbook, part II           Page 242
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA





APPENDIX P:  CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA
=========================================================


P.1  WHY TRANSLATE FROM ALGOL TO SIMULA?

     Here are some reasons why you may want to go over from
     DECsystem-10 ALGOL to DECsystem-10 SIMULA:

   > To use facilities which SIMULA has but not ALGOL, e.g.
     better data structuring, a garbage collector, simulation
     facilities, the SIMDDT system, higher security against
     programming errors, direct access i/o.

   > To use the text string handling in SIMULA, which is roughly
     five times faster than in ALGOL.

   > To use the formatted i/o in SIMULA, which is roughly twice
     as fast in SIMULA as in ALGOL.

     On the other hand, a SIMULA compilation takes nearly twice
     as long CPU time and requires about twice as much core as an
     ALGOL compilation.  For vector and matrix operations, SIMULA
     is faster with array bound check, ALGOL is faster without
     array bound check.

     What is said above applies to ALGOL version 3B and SIMULA
     version 1B.

     If you want to make your own comparisons of the efficiency
     of ALGOL versus SIMULA, you are advised to compile the
     SIMULA programs with the option settings
     options(/-q/-a/-i/-d).  This will remove some debugging
     features from SIMULA which ALGOL version 3B does not have,
     and thus give a more just comparison.

P.2  WHY SIMULA IS NOT COMPATIBLE WITH DEC 10 ALGOL?

     The DECsystem-10 SIMULA system is made highly compatible
     with SIMULA on other computers, in order to make it easy to
     transfer SIMULA programs between computers of different
     manufacture.  Unfortunately, this compatibility with other
     SIMULA systems had to mean less good compatibility with
     DECsystem-10 ALGOL.

     The main areas of bad compatibility between ALGOL and SIMULA
     on the DECsystem-10 are input-output and text string
     handling.
DECsystem-10 SIMULA Language Handbook, part II           Page 243
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA


     This appendix does not give a complete description of all
     that has to be changed to translate a program from ALGOL to
     SIMULA but some of the major points of difficulty are
     illustrated with examples.

P.3  TEXT STRING HANDLING

     Change STRING to TEXT when declaring text string variables.

     In SIMULA, a TEXT variable may not refer to a constant.
     Change T:= "TEXT CONSTANT" to T:- COPY("TEXT CONSTANT").

     Redeclare all INTEGER variables, which you use to store
     single characters, as CHARACTER variables.  In the
     following, the letter C indicates such a variable.

     Change C:= T.[N] into C:=T.SUB[N,1].GETCHAR.  Often repeated
     such ALGOL statements can be replaced by a single T.SUB
     operation in SIMULA.

     Instead of the procedure LINK, you will have to write your
     own concatenation procedure.  One way would be to allocate a
     longer string and copy the two parts into it.  Another way
     would be to use the set handling facilities of SIMSET in
     SIMULA to represent the linked strings as linked lists.

     Replace LENGTH(T) by T.LENGTH.  Often, the SIMULA procedure
     MORE can be used instead of the ALGOL procedure LENGTH as in
     the following example:
     Change
     FOR I:= 1 UNTIL LENGTH(T) DO IF T.[I] = " ".[1] THEN
     into
     WHILE T.MORE DO IF T.GETCHAR = ' ' THEN

     Replace COPY(T,M) by COPY(T.SUB(1,M)), or by only
     T.SUB(1,M), if you are not going to independently modify the
     two texts.

     Replace NEWSTRING(N,7) by BLANKS(N).  Only 7-bit byte
     strings can be handled using the TEXT concept of SIMULA.

     Remove DELETE procedure calls from your program.  SIMULA has
     a garbage collector, so you need not bother with
     deallocation of core.  However, at a few special occasions,
     it might be worthwile to replace DELETE(T) by T:-NOTEXT.

DECsystem-10 SIMULA Language Handbook, part II           Page 244
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA


P.4  INPUT/OUTPUT

     Replace INSYMBOL(C) by C:= INCHAR.

     Replace NEXTSYMBOL(C) by
     C:= IF MORE THEN IMAGE.SUB(POS,1).GETCHAR ELSE CHAR(13);

     Replace OUTSYMBOL(C) by OUTCHAR(C).

     Replace BREAKOUTPUT by BREAKOUTIMAGE.

     Replace WRITE(T) where T is a string variable or constant,
     by OUTTEXT(T).

     IMPORTANT:  You cannot use the special line editing
     characters inside output strings in SIMULA.  Replace them by
     calls to the corresponding explicit procedures.  For
     example, convert
     WRITE("FIRST LINE[N]SECOND LINE");
     into
     OUTTEXT("FIRST LINE");  OUTIMAGE;  OUTTEXT("SECOND LINE");

     Replace PAGE by EJECT(1) and NEWLINE by OUTIMAGE.

     Replace SPACE(N) by SETPOS(POS+N) and TAB by
     OUTCHAR(CHAR(9)).

     Instead of READ and PRINT you must choose the appropriate
     SIMULA procedure depending on the type of the argument.  For
     example, if R is a real value, PRINT(R,10,5) is converted
     into OUTFIX(R,5,17) and PRINT(R,0,5) is converted into
     OUTREAL(R,6,12).

     Note that SIMULA normally expects that the letter E is used
     in input data for the power-of-ten symbol.  This can however
     be changed to other characters with the SIMULA built-in
     procedure LOWTEN.

     BACKSPACE, ENDFILE and REWIND are not available in Release 1
     of DECsystem-10 SIMULA.

     READOCTAL must be programmed in SIMULA, IOCHAN must be
     programmed in MACRO 10, except when you use IOCHAN to test
     for end-of-file.  In the latter case, use the SIMULA
     built-in procedure ENDFILE.

     For ordinary input and output to the TTY, you can in SIMULA
     directly use ININT, INREAL, OUTINT etc.  If you want to use
     other devices, the following information may be helpful:

     Instead of
DECsystem-10 SIMULA Language Handbook, part II           Page 245
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA


     OUTPUT(5,"DSK");
     OPENFILE(5,"TEST.DAT",%177,%000011000050);

     write for example

     REF (OUTFILE) CHANNEL5;
     CHANNEL5:- NEW OUTFILE("DSK:  TEST.DAT[11,50] <177>");
     CHANNEL5.OPEN(BLANKS(130));

     Instead of CLOSEFILE(5) write for example CHANNEL5.CLOSE.

     Remove calls to the procedure RELEASE, since this function
     is automatically performed by the garbage collector in
     SIMULA.  In some cases, you might have to replace RELEASE(5)
     by CHANNEL5:- NONE.

     Instead of SELECTINPUT(5) you can for example write
     INSPECT CHANNEL5 DO
     BEGIN ...  END;

P.5  MISCELLANEOUS

     The so called "fat comma" method of inserting comments into
     procedure statements is not allowed in SIMULA.  Use ordinary
     comments instead.  Example:
     SPUR (A)ORDER:(7)RESULT TO:(V)
     can be changed to:
     SPUR (A, !ORDER;7, !RESULT TO;V);

     If you use "." as a readability symbol in identifiers,
     change it to "←".  Example:  TOP.OF.STACK in ALGOL is
     changed to TOP←OF←STACK in SIMULA.

     Not equal is "#" in ALGOL, "NE" in SIMULA.

     Octal constants in SIMULA begin with "8R", not with "%".

     "←" may not be used in SIMULA as an alternative to ":=".

     "DIV" in ALGOL is "//" in SIMULA.

     The operator "REM" in ALGOL should be changed to use the
     built-in INTEGER PROCEDURE "MOD" in SIMULA.

     SIMULA does not have the ALGOL built-in procedures BOOL,
     INT, IMIN, IMAX, RMIN, RMAX.

     The LONG REAL and REAL standard procedures (SIN etc.) have
     the same name in SIMULA.  The type of the procedure depends
     on the type of the argument.  Some of them are however
     always REAL.
DECsystem-10 SIMULA Language Handbook, part II           Page 246
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA


     "CHECKON 1" in ALGOL is "OPTIONS(/ARRAY)" in SIMULA,
     "CHECKOFF 1" in ALGOL is "OPTIONS(/-ARRAY)" in SIMULA.
     Unlike ALGOL, checking of array bounds is default in SIMULA,
     and must be explicitly set off if you do not want it.

     FORWARD declarations in ALGOL can be removed in SIMULA.

     "LISTON" in ALGOL is "OPTIONS(/LIST)" in SIMULA.
     "LISTOFF" in ALGOL is "OPTIONS(/-LIST)" in SIMULA.

     SIMULA does not have the OWN concept of ALGOL.  You can get
     something similar (but much more powerful) by using a SIMULA
     class.

     Only the twelve first characters of an identifier are
     significant in SIMULA.

     The "@" symbol cannot be used for powers-of-ten in SIMULA
     source programs.  Use "&" instead.  The power-of-ten symbol
     for input data can be set dynamically with the SIMULA
     built-in procedure LOWTEN.  Default is "E".

     Do not double the characters [, ] and ;  in SIMULA TEXT
     constants.  However, " is doubled just as in ALGOL.

     Assignments inside expressions are not allowed in SIMULA.
     Change e.g. A:= B + (C:= D + E);  into C:= D + E;  A:= B +
     C;

     You cannot in SIMULA omit the STEP in FOR-statements.
     Change FOR V:= E1 UNTIL E3 DO S into FOR V:= E1 STEP 1 UNTIL
     E3 DO S.

     Simple variables (not TEXTs or ARRAYs) are in SIMULA by
     default transferred by VALUE in procedure calls, not by
     NAME.  If you need NAME transmission, this must be
     explicitly declared, e.g.
     PROCEDURE P(X);  NAME X;  REAL X;

     If an actual TEXT parameter is a constant, the corresponding
     formal parameter must in SIMULA always be declared as either
     VALUE or NAME in the procedure heading.

     The procedures DIM, LB, UB, GFIELD, SFIELD are not available
     in SIMULA but can easily be written as external MACRO 10
     procedures to SIMULA.

     The method of calling external FORTRAN procedures is
     slightly different in SIMULA.  For example instead of
     CALL(FORT,X,Y) you write in SIMULA:
DECsystem-10 SIMULA Language Handbook, part II           Page 247
APPENDIX P, CONVERSION FROM DEC 10 ALGOL TO DEC 10 SIMULA


     OPTIONS(/E:F40,FORT);                 -\  In a file called
     PROCEDURE FORT(A,B); REAL A, B;;      -/  FORT.SIM
      ...
     EXTERNAL PROCEDURE FORT;
      ...
     FORT(X,Y);

     Input-output is not allowed in FORTRAN when called from
     SIMULA.

     Further information about calling FORTRAN is given in
     appendix E.
DECsystem-10 SIMULA Language Handbook, part II           Page 248
INDEX


     INDEX
     =====



     $  in logical name  . . . . .  49
     $, in file name at run time .  50
     $simula card  . . . . . . . .  19, 200

     % in logical name . . . . . .  49
     %, in file name at run time .  50

     .sim extension  . . . . . . .  16

     /simula . . . . . . . . . . .  16

     10, power of, symbol  . . . .  244, 246

     <cr>  . . . . . . . . . . . .  15
     <identification2> in simddt .  70
     <identification2> used in output simddt command  72
     <identification> in simddt  .  70
     <line> in simddt  . . . . . .  69
     <module> in simddt  . . . . .  69
     <nnnnn> in simddt . . . . . .  69
     <relation operator> . . . . .  71
     <string> in simddt  . . . . .  70
     <subscript list> in simddt  .  70

     ?lnkugs undefined global symbols  17

     @ delimiter . . . . . . . . .  52

     Abs, system function  . . . .  29
     Access switch . . . . . . . .  53, 58
     Accum, parameters . . . . . .  36
     Actual record size in directfile  60
     Algol, conversion from algol to simula  242
     All, simddt command . . . . .  75
     Altmode character . . . . . .  63
     Altmode, object i/o . . . . .  56
     Antithetic variables  . . . .  30
     Append mode . . . . . . . . .  53, 58
     Arccos, system function . . .  29
     Arccosine single precision, internal representation  189
     Arcsin, system function . . .  29
     Arcsine function single precision., internal representation  189
     Arctan, system function . . .  29
     Arctangent single precision., internal representation  189
     Arithmetic constants in source programs  84
     Array bound checking, efficiency of  242
     Array dimensions, number of, error message  114
     Array record, internal representation  89
     Array size, error message . .  146
     Array subscript, error message  143
     Array switch  . . . . . . . .  22
     Array variables, internal representation  89
     Array, utility macro for external macro-10 procedures  178
     Ascii device control characters  62
     Ascii mode i/o  . . . . . . .  48
     Assembly language procedures called from simula  174
     Assembly language, external procedure  171
     Assembly procedure  . . . . .  24
     Assign command  . . . . . . .  50
     Assign, utility macro for external macro-10 procedures  180
     Asterisk, in run-time file descriptor  50
     At , simddt command . . . . .  71
     Atr libraries . . . . . . . .  41
     Attributes, internal order  .  98
     Automatic library search  . .  23

     Backspace (decsystem-10 algol)  244
     Basic symbols . . . . . . . .  84
     Basicio . . . . . . . . . . .  62
     Batch . . . . . . . . . . . .  19, 200
     Bibliograhpy  . . . . . . . .  9
     Binary constants  . . . . . .  32
     Binary mode i/o . . . . . . .  48
     Blank line numbers  . . . . .  226
     Block instance, internal representation  94
     Block level . . . . . . . . .  22
     Block level for external module  43
     Bool (decsystem-10 algol) . .  245
     Boolean constants . . . . . .  85
     Boolean variables, internal representation  87
     Boolean, utility macro for external macro-10 procedures  178
     Breakoutimage . . . . . . . .  32, 58
     Breakoutput (decsystem-10 algol)  244
     Breakpoint  . . . . . . . . .  64
     Breakpoint in simddt  . . . .  71
     Breakpoints, line numbers for  226
     Breaks, simddt command  . . .  71
     Buffer area . . . . . . . . .  53
     Buffer ring . . . . . . . . .  53
     Buffer switch . . . . . . . .  53

     Call system function  . . . .  32
     Capacity limitations, error message  120, 128, 146
     Capacity restrictions . . . .  34
     Card batch example  . . . . .  200
     Card input to the compiler  .  82
     Cardinal function, efficiency of  78
     Carriage return . . . . . . .  15
     Carriage return character . .  63
     Carriage return, object time i/o  56
     Cdc real precision higher than on dec  234
     Cdc simula program conversion to dec  234
     Cdcsim conversion program . .  234
     Cdcsim distribution of  . . .  237
     Chain, simddt command . . . .  74
     Char built-in function  . . .  62
     Char, system function . . . .  29
     Character constants . . . . .  85
     Character constants, allowed characters in  62
     Character conversion during i/o  62
     Character representation  . .  29, 83
     Character representation of special characters  83
     Character representation, initialization  29
     Character set, error message   111
     Character variables, internal representation  87
     Character, utility macro for external macro-10 procedures  178
     Characters, device control, in ascii-iso  62
     Check . . . . . . . . . . . .  24
     Checking of terminal input data  237
     Checkoff (decsystem-10 algol)  246
     Checkon (decsystem-10 algol)   246
     Class basicio . . . . . . . .  62
     Class directfile  . . . . . .  60
     Class infile  . . . . . . . .  56
     Class instance  . . . . . . .  23
     Class instance, internal representation  95
     Class outfile . . . . . . . .  58
     Class printfile . . . . . . .  59
     Closefile (decsystem-10 algol)  245
     Code  . . . . . . . . . . . .  24
     Code  . . . . . . . . . . . .  24
     Collating sequence  . . . . .  29
     Colon, error message  . . . .  104
     Comma . . . . . . . . . . . .  15
     Command examples  . . . . . .  16
     Command syntax (simddt) . . .  69
     Commands (compil) . . . . . .  16
     Comment . . . . . . . . . . .  33
     Comment in source programs  .  85
     Common base definition  . . .  8
     Compatibility of programs to other computers  80
     Compatibility with decsystem-10 algol  242
     Compatibility with simula on other computers  242
     Compil cusp . . . . . . . . .  16
     Compil-class commands . . . .  16
     Compilation core requirements  11
     Compile . . . . . . . . . . .  16
     Compile monitor command, example  198
     Compiler commands . . . . . .  14
     Compiler input  . . . . . . .  82
     Compiler source code diagnostics  104
     Compiler switches . . . . . .  14
     Compiler switches debugs and identification  65
     Components, run-time system, internal representation  186
     Concatenation of source files  16
     Constants in source programs   84
     Contents, table of  . . . . .  3
     Continue command  . . . . . .  66
     Control cards in batch  . . .  200
     Control cards to sprint . . .  21
     Control data simula program conversion  234
     Control-c . . . . . . . . . .  15
     Control-z character . . . . .  63
     Controlled variable, restrictions  36
     Conversational i/o, writing of  237
     Conversational input and output  244
     Conversational input data checking  237
     Conversion from algol to simula  242
     Conversion from cdc to dec of simula programs  234
     Conversion of simula programs  11, 233
     Conversion of simula programs from univac to dec  235
     Conversion of source code . .  11
     Convert source program conversion program  235
     Copy text procedure . . . . .  243
     Copyright . . . . . . . . . .  2
     Copyright of the simula system  2
     Core requirements . . . . . .  11
     Core size of run time system, internal representation  194
     Core usage, optimization of .  78
     Coroutine handling, error message  145
     Cos, system function  . . . .  29
     Cosh, system function . . . .  29
     Cost of using simula as compared to algol  242
     Cp module, internal representation  186
     Creating line numbered files in simula  54
     Cref (in compil)  . . . . . .  16
     Cref switch . . . . . . . . .  22
     Cross reference listing . . .  22
     Cs module, internal representation  186
     Ctl file, example . . . . . .  203

     Data base handling  . . . . .  237
     Data transmission in algol versus simula  244
     Ddt   . . . . . . . . . . . .  220
     Ddt when you wanted simddt  .  65
     Debug mode (simddt) . . . . .  69
     Debug monitor command . . . .  16, 44, 65
     Debug monitor command, example  199
     Debugging system (simddt) . .  64
     Debugging system (simddt) and line numbers  226
     Debugs switch . . . . . . . .  22
     Dec monitors  . . . . . . . .  10
     Decsystem-10 algol, conversion into simula  242
     Decus library . . . . . . . .  9
     Defining documents  . . . . .  8
     Delete (decsystem-10 algol) .  243
     Delimiters in file descriptor  15
     Detach, error message . . . .  145
     Device control characters in ascii-iso  62
     Device, in run-time file descriptor  50
     Device, source  . . . . . . .  14
     Devices for directfile  . . .  61
     Devices for infile  . . . . .  56
     Devices for outfile . . . . .  58
     Devices for printfile . . . .  59
     Diagnostic messages at run time  141
     Diagnostic messages from the compiler  104
     Dialogue i/o, writing of  . .  237
     Dimensions, number of, error message  114
     Direct access files, application package with  237
     Directfile  . . . . . . . . .  60
     Directory program for simula modules  44
     Discrete, parameters  . . . .  36
     Disk block  . . . . . . . . .  60
     Display record, internal representation  93
     Display terminals, how to avoid automatic eject  81
     Display, simddt command . . .  73
     Distribution of library programs  236
     Div operator (decsystem-10 algol)  245
     Dollar in logical name  . . .  49
     Dollar, in file name at run-time  50
     Double precision  . . . . . .  33
     Dump monitor command  . . . .  240
     Dynamic addresses, internal representation  90
     Dynamic records, internal representation  93

     Edit overflow . . . . . . . .  28
     Editing characters in source programs  86
     Editing of simula source programs  226
     Edits text editor . . . . . .  227
     Efficiency of simula compared to algol  242
     Efficient call on macro-10 procedures  174
     Efficient program writing . .  77
     Eject . . . . . . . . . . . .  59
     End comment warnings  . . . .  86
     End comments in source programs  85
     End of file record  . . . . .  56, 61
     Endfile (decsystem-10 algol)   244
     Endfile, for directfile . . .  61
     Endfile, for infile . . . . .  56
     Entier, system function . . .  29
     Entry name in external procedure  25
     Equal sign  . . . . . . . . .  14-15
     Erroneous programs, treatment of, error message  143
     Error messages  . . . . . . .  23
     Error messages from link-10 .  17
     Error messages from the compiler  104
     Error messages, at run time .  141
     Error mode (simddt) . . . . .  69
     Error report  . . . . . . . .  221
     Escape character  . . . . . .  63
     Eventnotice record, internal representation  96
     Eventnotice, internal representation  97
     Examples of simddt commands .  76
     Execute . . . . . . . . . . .  16
     Execute monitor command . . .  44
     Execution time error messages  141
     Exit, simddt command  . . . .  75
     Exp, system function  . . . .  29
     Exponent part of putreal and outreal  28
     Exponential function double precision, internal representation  189
     Extension, in run-time file descriptor  50
     Extension, listfile . . . . .  14
     Extension, relfile  . . . . .  14
     Extensions  . . . . . . . . .  33
     External class  . . . . . . .  22
     External declaration  . . . .  38
     External fortran or macro, error message  106
     External image  . . . . . . .  60
     External libraries for atr and rel files  43
     External library specification  23
     External module, block level of  43
     External modules  . . . . . .  38
     External procedure in fortran  172
     External procedure in macro-10  174
     External procedure in macro-10 or fortran  171
     External program  . . . . . .  22
     External switch . . . . . . .  22, 24
     External switch in options statement  43

     F40 . . . . . . . . . . . . .  24
     Fat comma comment convention of algol 60  245
     Figure graphic package  . . .  238
     File allocation . . . . . . .  58
     File definitions  . . . . . .  49
     File descriptor delimiters  .  15
     File descriptor format  . . .  14
     File descrptor  . . . . . . .  50
     File handling at run time, error message  144, 147
     File name, in run-time file descriptor  50
     File object . . . . . . . . .  49
     File specification, run-time   23, 25
     File specifications . . . . .  25
     Filename, listfile  . . . . .  14
     Files switch  . . . . . . . .  53
     For statement, controlled variable, restrictions  36
     For statements, efficiency considerations  77
     Forlib functions, internal representation  189
     Form feed character . . . . .  63
     Form feed, in printfile . . .  59
     Form feed, object i/o . . . .  56
     Formal parameter, specifications  37
     Formatted i/o, efficiency of   242
     Fortran . . . . . . . . . . .  24
     Fortran calls, algol versus simula  246
     Fortran external procedure  .  172
     Fortran interface, internal representation  191
     Fortran library functions used in simula, internal representation  189
     Fortran library, error message  153
     Fortran programming example .  173
     Fortran, error message  . . .  106
     Fortran, external procedure .  171
     Forward declarations  . . . .  246
     Forward declarations (decsystem-10 algol)  246
     Fqc program distribution of .  237
     Fqc program for program measurements  223
     Fraction format, input  . . .  28
     Freechannel, utility macro for external macro-10 procedures  179
     Frequency count on program execution  223
     Fudge2 program for handling libraries  43
     Function designator instance, internal representation  95
     Functions, standard . . . . .  195

     Garbage collection  . . . . .  53
     Garbage collection, optimization of  78
     Generated code  . . . . . . .  240
     Genlsn switch for teco  . . .  228
     Get monitor command . . . . .  65
     Getaadd, utility macro for external macro-10 procedures  180
     Getadd, utility macro for external macro-10 procedures  180
     Getchannel, utility macro for external macro-10 procedures  179
     Getreal precision . . . . . .  77
     Gettadd, utility macro for external macro-10 procedures  180
     Gettype, utility macro for external macro-10 procedures  181
     Getval, utility macro for external macro-10 procedures  180
     Global run-time switches  . .  53
     Go to, error message  . . . .  146
     Graphic package for tektronix terminals  238

     Hardware representation . . .  82
     Help facility in user programs  237
     Help files  . . . . . . . . .  12
     Help switch . . . . . . . . .  22
     Help switch in run-time . . .  54
     Help, simddt command  . . . .  75
     Hexadecimal constants . . . .  32
     High segment  . . . . . . . .  11
     High segment at run time, internal representation  186
     High segment components, run time system, internal representation  186
     Histd, parameters . . . . . .  36

     I/o at run time, error message  145, 147
     Ibm 360/370 . . . . . . . . .  8
     Ibmsim distribution of  . . .  236
     Identification switch . . . .  23
     Identifier representation . .  84
     Identifiers, number of, error message  120
     Identifiers, standard . . . .  195
     If-statement, error messages   114
     Ifchanged, simddt command keyword  71
     Ifeof, utility macro for external macro-10 procedures  179
     Ifneof, utility macro for external macro-10 procedures  179
     Image size in directfile  . .  60
     Image size of sysin . . . . .  62
     Image size of sysout  . . . .  62
     Imagesize switch  . . . . . .  54, 60
     Imax (decsystem-10 algol) . .  245
     Imin (decsystem-10 algol) . .  245
     Index . . . . . . . . . . . .  248
     Indirect delimiter  . . . . .  52
     Indirect specification file .  52
     Infile  . . . . . . . . . . .  56
     Information retrieval application package  237
     Inimage, for infile . . . . .  56
     Inimage, utility macro for external macro-10 procedures  179
     Initialization of random number streams  30
     Input (decsystem-10 algol)  .  245
     Input data checking . . . . .  237
     Input to simddt . . . . . . .  67
     Input to the compiler . . . .  82
     Input,simddt command  . . . .  73
     Input-output at run time, error message  145, 147
     Input-output, efficiency of .  242
     Input/output in algol versus simula  244
     Inreal precision  . . . . . .  77
     Inspect statement, efficiency of  78
     Inspect, simddt command . . .  73
     Insymbol (decsystem-10 algol)  244
     Int (decsystem-10 algol)  . .  245
     Integer constants . . . . . .  33, 84
     Integer to long real, internal representation  191
     Integer variables, internal representation  87
     Integer, utility macro for external macro-10 procedures  178
     Internal representation . . .  87
     Io module, internal representation  186
     Iochan (decsystem-10 algol) .  244
     Ioed module, internal representation  187
     Ionf module, internal representation  186
     Iso device control characters  62
     Iso-7 . . . . . . . . . . . .  48

     Jumps, error message  . . . .  146

     Ka10 cpu  . . . . . . . . . .  9
     Keywords  . . . . . . . . . .  84
     Ki10 cpu  . . . . . . . . . .  9
     Kl10 cpu  . . . . . . . . . .  9

     Label, utility macro for external macro-10 procedures  178
     Labels, unsigned integer  . .  37
     Language extensions . . . . .  33
     Leading spaces in command . .  15
     Leading tabs in commands  . .  15
     Left arrow  . . . . . . . . .  14-15
     Legal characters in command .  15
     Libraries of attribute files   41
     Library of programs . . . . .  236
     Library search at compile-time  23
     Limit switch  . . . . . . . .  54, 58
     Line editing characters in source programs  86
     Line feed character . . . . .  63
     Line feed, object i/o . . . .  56
     Line number in simddt . . . .  69
     Line number table . . . . . .  23-24
     Line number, error message  .  107
     Line numbered files . . . . .  226
     Line numbering of files . . .  54
     Line numbers in input files .  82
     Line numbers, blank . . . . .  226
     Line numbers, format of . . .  228
     Linear, parameters  . . . . .  36
     Lined text editor . . . . . .  227
     Linesperpage  . . . . . . . .  59
     Link as used in decsystem-10 algol  243
     Link-10 error messages  . . .  17
     Link-10 error messages, explanation  16
     Link-10 linking loader  . . .  10
     Linkage class, internal representation  98
     List (in compil)  . . . . . .  16
     List switch . . . . . . . . .  14, 23
     Listfile  . . . . . . . . . .  14
     Listfile extension  . . . . .  14
     Listfile, default extension .  14
     Listfile, page heading  . . .  25
     Listoff (decsystem-10 algol)   246
     Liston (decsystem-10 algol) .  246
     Litterature list  . . . . . .  9
     Ln, system function . . . . .  29
     Lnkugs error message, explanation of  16
     Lnkugs undefined global symbols  17
     Load commands, errors caused by  16
     Load monitor command  . . . .  16, 44, 65
     Load monitor command without simula-modified compil  17
     Load monitor command, example  198
     Loading and executing programs with external modules  42
     Local run-time switches . . .  53
     Location  . . . . . . . . . .  61
     Logarithm function double precision, internal representation  190
     Logarithm function single precision., internal representation  189
     Logical name  . . . . . . . .  49
     Long real . . . . . . . . . .  33
     Long real constants . . . . .  84
     Long real to integer, internal representation  191
     Long real variables, internal representation  87
     Longreal, utility macro for external macro-10 procedures  178
     Low segment, rts, internal representation  189
     Lower case letters  . . . . .  84
     Lower case letters, use in portable program  29
     Lowered ten symbol  . . . . .  84
     Lstfile . . . . . . . . . . .  14
     Lstfile extension . . . . . .  14
     Lstfile, default filename . .  14
     Lstfile, page heading . . . .  25

     Ma module, internal representation  191
     Macro 10 listing of generated code  240
     Macro-10 procedures called from simula  174
     Macro-10 procedures, external, internal representation  191
     Macro-10 programming examples  183
     Macro-10, external procedure   171
     Magnetic tape . . . . . . . .  53
     Main program  . . . . . . . .  22
     Mat module, internal representation  191
     Mathematical functions available  29
     Mathematical functions, argument and result type  29
     Mathematical functions, error message  153
     Mathematical subroutines in simlib, internal representation  189
     Memory allocation, optimization of  78
     Merging simula source files .  237
     Messages, error, at run time   141
     Messages, error, from the compiler  104
     Minus, error message  . . . .  104
     Mod, system function  . . . .  29
     Monitor . . . . . . . . . . .  10

     Name parameter transmission, algol versus simula  246
     Name, utility macro for external macro-10 procedures  178
     National characters . . . . .  32
     New . . . . . . . . . . . . .  49
     Newstring (decsystem-10 algol)  243
     Nextsymbol (decsystem-10 algol)  244
     Noarrays, simddt command  . .  75
     Nocheck . . . . . . . . . . .  24
     Noerr switch  . . . . . . . .  23
     None, internal representation  88
     Norwegian computing center  .  235
     Null character  . . . . . . .  29, 63
     Numbered lines in source programs  82
     Numbered switch . . . . . . .  54

     Object program execution  . .  23
     Object program i/o  . . . . .  48
     Object time error messages  .  141
     Object time system  . . . . .  11
     Object time system, internal representation  186
     Ocep module, internal representation  187
     Ocin module, internal representation  187
     Ocio module, internal representation  187
     Ocsp module, internal representation  191
     Octal constants . . . . . . .  32
     Old source program listings, validity of line numbers  226
     Openfile (decsystem-10 algol)  245
     Operator words  . . . . . . .  84
     Operator words in simula  . .  195
     Optimization of programs  . .  77, 223
     Optimization, degree of in the compiler  242
     Options statement . . . . . .  24
     Options statement, error messages  105
     Options statement, external switch  43
     Ordering simula . . . . . . .  9
     Outfile . . . . . . . . . . .  58
     Outimage, for infile  . . . .  56
     Outimage, for outfile . . . .  58
     Outimage, utility macro for external macro-10 procedures  179
     Output (decsystem-10 algol) .  245
     Output from simddt  . . . . .  67
     Output in algol versus simula  244
     Output, efficiency of . . . .  242
     Output, simddt command  . . .  72
     Outsymbol (decsystem-10 algol)  244
     Overflow, error message . . .  107, 111
     Own . . . . . . . . . . . . .  37
     Own (decsystem-10 algol)  . .  246
     Own declaration . . . . . . .  246

     Page (decsystem-10 algol) . .  244
     Page heading, list file . . .  25
     Page switch . . . . . . . . .  23, 25
     Page, new, in program listing  205
     Parameter checking  . . . . .  24
     Parameter delimiter . . . . .  37
     Parameter transmision, algol versus simula  246
     Parameter transmission efficiency  78
     Parameter transmission to procedures  36
     Parameters to procedures, error message  149
     Parameters, internal order  .  98
     Parameters, internal representation  92
     Part-compilation  . . . . . .  38
     Part-compilation, removal of   237
     Percent, in file name at run-time  50
     Percent, in logical name  . .  49
     Performance measurements  . .  223
     Ph module, internal representation  187
     Phfo module, internal representation  191
     Physical block size . . . . .  60
     Physical record size in directfile  60
     Picture processing  . . . . .  238
     Portability of programs to other computers  80
     Portability of simula from cdc to dec  234
     Power of ten symbol . . . . .  28
     Power-of-ten symbol . . . . .  244, 246
     Ppn, in run-time file descriptor  50
     Precision, of real:s cdc compared to dec  234
     Prefix block instance, internal representation  96
     Prev, system function . . . .  33
     Print (decsystem-10 algol)  .  244
     Printfile . . . . . . . . . .  59
     Proc, utility macro for external macro-10 procedures  178
     Procedure call, error message  149
     Procedure in macro-10 or fortran  171
     Procedure instance, internal representation  94
     Procedure parameter transmission  36
     Procedure parameter transmission efficiency  78
     Procedure parameters, algol versus simula  246
     Procedure, utility macro for external macro-10 procedures  178
     Proceed, simddt command . . .  74
     Process class, internal representation  98
     Program input to the compiler  82
     Program library . . . . . . .  236
     Program listing . . . . . . .  24, 205
     Program measurement and optimization  223
     Program measurement system  .  237
     Program, source, input to the compiler  82
     Programs on cards . . . . . .  82
     Protection, in run-time file descriptor  50
     Pseudo random number generator  30
     Pseudo-random drawing, error message  150

     Qualification switch  . . . .  23
     Quasi-parallel processing, error message  145
     Question-and answer i/o, writing of  237
     Quick . . . . . . . . . . . .  24
     Quick, assembly parameter in macsim  178
     Quick, external macro-10 procedure  174
     Quickproc, macro in macsim  .  178, 181

     R command . . . . . . . . . .  14
     Radix constants . . . . . . .  84
     Radix representation  . . . .  33
     Random access . . . . . . . .  48, 60
     Random drawing procedures, parameters  36
     Random drawing routines, internal representation  192
     Random drawing, error message  150
     Random drawing, generator . .  30
     Random number generator . . .  30
     Rank, system function . . . .  29
     Rd module, internal representation  192
     Read (decsystem-10 algol) . .  244
     Read only file  . . . . . . .  53
     Readoctal (decsystem-10 algol)  244
     Real constants  . . . . . . .  84
     Real precision on cdc and on dec  234
     Real variables, internal representation  87
     Real, utility macro for external macro-10 procedures  178
     Record size in directfile . .  54, 60
     Reenter monitor command . . .  10, 65
     Reenter, error message  . . .  165
     Reentrant code, generation of  11
     Reentrant high segment  . . .  11
     Ref, utility macro for external macro-10 procedures  178
     Reference variables, internal representation  88
     References  . . . . . . . . .  9
     Relative record number  . . .  60
     Release (decsystem-10 algol)   245
     Release of simula, conditions of  2
     Release version of simula . .  1
     Relfile . . . . . . . . . . .  14
     Relfile extension . . . . . .  14
     Rem operator (decsystem-10 algol)  245
     Remove, simddt command  . . .  71
     Renumbering of source program lines  226
     Representation in hardware  .  82
     Representation of identifiers  84
     Representation of special characters  83
     Reserved simula words . . . .  195
     Responsibility for errors . .  2
     Restrictions on the compiler   34
     Resume, error message . . . .  145
     Return, utility macro for external macro-10 procedures  179
     Rewind (decsystem-10 algol) .  244
     Rmax (decsystem-10 algol) . .  245
     Rmin (decsystem-10 algol) . .  245
     Ronly . . . . . . . . . . . .  53
     Rts i/o . . . . . . . . . . .  48
     Run time error messages . . .  141
     Run time errors . . . . . . .  66
     Run-time core requirements  .  11
     Run-time i/o  . . . . . . . .  48
     Run-time module sizes, internal representation  194
     Run-time switches . . . . . .  51, 53
     Run-time system . . . . . . .  11
     Run-time systems components, internal representation  186
     Runswitches switch  . . . . .  23, 25, 51

     Sa module, internal representation  187
     Safeio conversational i/o package  237
     Sane module, internal representation  192
     Save monitor command  . . . .  65
     Scheduled, simddt command . .  75
     Search list for atr files . .  41
     Search switch . . . . . . . .  23, 25
     Segmentation into separately compiled parts  38
     Selectinput (decsystem-10 algol)  245
     Separare compilation , simddt exemple  219
     Separate compilation  . . . .  38
     Separate compilation, removal of  237
     Separately compiled fortran procedure  172
     Separately compiled module, block level of  43
     Separately compiled procedure in macro-10  174
     Separately compiled procedure in macro-10 or fortran  171
     Sequential access . . . . . .  56, 58
     Settype, utility macro for external macro-10 procedures  181
     Sfd in run-time file descriptor  50
     Sharable reentrant code, generation of  11
     Short integer . . . . . . . .  33
     Short integer variables, internal representation  87
     Sign, system function . . . .  29
     Simcom.hlp  . . . . . . . . .  12
     Simddt  . . . . . . . . . . .  22, 64
     Simddt and ddt  . . . . . . .  220
     Simddt command examples . . .  76
     Simddt commands . . . . . . .  71
     Simddt examples . . . . . . .  209
     Simddt, automatic loading of   11
     Simddt, error message . . . .  155
     Simddt, handling of line numbered source programs  226
     Simddt, loading of  . . . . .  65
     Simddt.hlp  . . . . . . . . .  12
     Simdir program  . . . . . . .  11, 44
     Simed distribution of . . . .  236
     Simexp program for merging source files  237
     Simibm distribution of  . . .  236
     Simlib  . . . . . . . . . . .  10
     Simlib, library file, internal representation  189
     Simrt1, simrt2 modules, internal representation  187
     Simrts module, internal representation  187
     Simrts, internal representation  186
     Simrts.hlp  . . . . . . . . .  12, 54
     Simula debugging system . . .  64
     Simula program conversion . .  11
     Simula program library  . . .  236
     Simula standard identifiers .  196
     Simula standards group  . . .  8
     Simula, reserved words  . . .  195
     Simula.hlp  . . . . . . . . .  12
     Simulation block, internal representation  97
     Simulation, class, error message  151
     Simulation, concurrent instances of  27
     Sin, system function  . . . .  29
     Sinh, system function . . . .  29
     Size switch . . . . . . . . .  54, 58-59
     Software performance report .  221
     Software problem report . . .  221
     Son of stopgap text editor  .  227
     Sos text editor . . . . . . .  227
     Source code conversion  . . .  11
     Source device . . . . . . . .  14
     Source program conversion . .  234
     Source program input to the compiler  82
     Source program listing  . . .  24, 205
     Space (decsystem-10 algol)  .  244
     Spaces in commands  . . . . .  15
     Spaces in source programs . .  86
     Spacing . . . . . . . . . . .  59
     Special character representation  83
     Specification file  . . . . .  51
     Specify, utility macro for external macro-10 procedures  178
     Speed of simula as compared to algol  242
     Spooled cdr data file . . . .  19
     Spooled devices . . . . . . .  48
     Spr . . . . . . . . . . . . .  221
     Sprint control cards  . . . .  21
     Sqrt, system function . . . .  29
     Square brackets . . . . . . .  15
     Square root single precision, internal representation  192
     Ss module, internal representation  193
     Standard functions  . . . . .  77
     Standard identiiers . . . . .  196
     Standardization of simula . .  8
     Stop at, simddt command . . .  71
     Stopgap, son of, text editor   227
     Store data base handling package  237
     String  . . . . . . . . . . .  37
     String concept of algol 60  .  243
     String handling in algol versus simula  243
     String handling, efficiency of  242
     Structured programming  . . .  77
     Su module, internal representation  193
     Sub-file directories in run-time file descriptor  50
     Subclass instance, internal representation  96
     Subclass, order of declarations  37
     Switch designator, side effects  37
     Switch value  . . . . . . . .  54
     Switch, attribute of terminated class instance  37
     Switch, utility macro for external macro-10 procedures  178
     Switches for the $simula card  20
     Switches, compiler  . . . . .  14, 22
     Switches, error messages  . .  105, 146
     Symbol table for simddt . . .  22
     Syntax of commands  . . . . .  14
     Sysin . . . . . . . . . . . .  62
     Sysin input data checking . .  237
     Sysin, used as specification file  51
     Sysout  . . . . . . . . . . .  62
     System prefixes, level of declaration  27
     System prefixes, restrictions  27

     Tab (decsystem-10 algol)  . .  244
     Tab character, use after line numbers  228
     Tabs in commands  . . . . . .  15
     Tan, system function  . . . .  29
     Tangent single precision, internal representation  191
     Tanh, system function . . . .  29
     Teco text editor  . . . . . .  226-227
     Tektronix terminal graphics package  238
     Ten, power of, symbol . . . .  244, 246
     Terminal input and output . .  244
     Terminal input data checking   237
     Text constant used in assignments  243
     Text constant, error message   104, 108
     Text constant, length of, error message  111
     Text constants  . . . . . . .  85
     Text constants, allowed characters in  62
     Text constants, multi-line  .  80
     Text editing of simula source programs  226
     Text editing, error message .  152
     Text editor . . . . . . . . .  227
     Text editor, selection of . .  227
     Text record, internal representation  88
     Text string handling in algol versus simula  243
     Text string handling, efficiency of  242
     Text variables, internal representation  88
     Text, utility macro for external macro-10 procedures  178
     Time procedure  . . . . . . .  31
     Title in program listing  . .  205
     Transmission mode for parameters, default  37
     Transport of simula programs from cdc  234
     Transportability of programs to other computers  80
     Tty input and output  . . . .  244
     Tx module, internal representation  188
     Txbl module, internal representation  188

     Undefined global symbols, link-10 error message  17
     Unique logical name . . . . .  49, 51
     Univac simula programs conversion to dec  235
     Unreduced subblock, internal representation  94
     Unsigned integer labels . . .  37
     Unspooled devices . . . . . .  48
     Unwritten record in directfile  61
     Use, simddt command . . . . .  74
     Utility programs  . . . . . .  11
     Utility programs library  . .  236

     Value parameter transmission, algol versus simula  246
     Value, utility macro for external macro-10 procedures  178
     Variables, internal order . .  98
     Variables, simddt command . .  74
     Vertical tab character  . . .  63
     Vertical tab, object i/o  . .  56
     Virtual matches, restrictions and rules  28
     Virtual, error message  . . .  113

     Warning message . . . . . . .  23
     Warning messages from the compiler  77
     Warning switch  . . . . . . .  23
     While statement . . . . . . .  33
     While statements, efficiency considerations  77
     Wordaligned switch  . . . . .  54
     Write (decsystem-10 algol)  .  244

     Y switch  . . . . . . . . . .  24

     [ (decsystem-10 algol)  . . .  244, 246

     ↑c monitor command  . . . . .  65
     ↑o monitor command in simddt   68
     ← (decsystem-10 algol)  . . .  245
     # (decsystem-10 algol)  . . .  245